Example: Running CHAMP
This example requires the CLI to be fully set up and operational. Please refer to the "Install and Setup" page for details. You can test your installation by typing the following command:
#To test installation
cosmosid
1. Uploading samples for CHAMP analysis
-
In the command line, navigate to your directory containing paired-ended WGS samples in FASTQ format.
CLI supports files of following extensions: 'fasta', 'fna', 'fasta.gz', 'fastq', 'fq', 'fastq.gz', 'bam', 'sra' -
Create a cloud directory for your uploads and grab the folder key
cosmosid --api_key <YOUR_API_KEY> --base_url https://app.cosmosid.com mkdir --name champ_test
- This command will produce a folder UUID that will be used for further commands.
- Example output: Folder champ_test: 0e8ac013-07db-4ccf-a4ef-c22477556185 has been created
-
Upload your data to your new parent directory using the folder UUID and workflow command
using the upload command:
cosmosid --api_key <YOUR_API_KEY> --base_url https://app.cosmosid.com upload
-- parent <FOLDER_UUID>
-- type metagenomics
-- wf champ_taxa_functional_gbm_gmm
-- dir $(pwd)
Allow ~24hours for analysis to complete.
2. Download results in .zip format
-
Check the list of samples and their statuses using the files command and grab the Sample UUID:
cosmosid --api_key <YOUR_API_KEY> --base_url https://app.cosmosid.com files -- parent <FOLDER_UUID>
OR Use the following command to export all sample UUIDs within your parent directory
cosmosid --api_key <YOUR_API_KEY> --base_url https://app.cosmosid.com files --parent <FOLDER_UUID> -f csv | tail -n +3 | cut -f3 -d ‘,’ > champ_ids.tsv
-
Select the sample UUID(s) and use it in the reports command to download results.
cosmosid --api_key <YOUR_API_KEY --base_url https://app.cosmosid.com reports --id \<SAMPLE_ID>
OR Use the following command with the champ_ids.tsv file to download all of your samples
within your parent directory:cat champ_ids.tsv | sed ‘s/”//g’ | while read line; do echo $line; cosmosid --api_key \<YOUR_API_KEY> --base_url <https://app.cosmosid.com> reports --id $line; done
Updated 12 days ago