-
Notifications
You must be signed in to change notification settings - Fork 41
Running PHoeNIx on Different Systems
Nextflow uses config files to determine how many CPUs/Memory to give to jobs which are all found in the conf folder. The test profile has it own config that can be edited to speed up the test sample as its just limited to 2 CPUs.
PHoeNIx is structured so that each process that is run is "labeled" high, medium or low. See SPAdes as and example. The CPUs/Memory requirements are then determined by the process labels in the base.config file. Editing the CPUs/Memory in the base.config for a label well cause all process with that label to use those resources.
If you used git clone for your install then simply edit the base.config file and save it in the same place and you are good to go. However, if you used nextflow run or are running on nextflow tower the best way to change the number of CPUs/Memory for each process is to create a new config file with labels like the base.config and pass it to nextflow with the -c command on CLI.
To run PHoeNIx on an HPC and submit jobs to a cluster you will need to make config file for your executor. We provide a template in the conf folder to edit. How to pass this to PHoeNIx depends on the type of install you are using. For full details on configs see nextflow documentation.
After editing the template in the conf folder you save it in the same place and then run PHoeNIx with:
nextflow run $PATH_TO_INSTALL/phoenix -entry PHOENIX -profile singularity,custom_HPC --input samplesheet.csv --kraken2db $PATH_TO_DBAfter editing the template in the conf folder, then you save it to a new location passing it the PHoeNIx with the -c parameter. Now you can run PHoeNIx with:
nextflow run cdcgov/phoenix -r v1.0.0 -entry PHOENIX -profile singularity -c mycustom_config.config --input samplesheet.csv --kraken2db $PATH_TO_DBFor states that are using Terra.bio to run bioinformatic workflows like SARS-CoV-2 genomic characterization we have provided PHoeNIx as a workflow that can be imported into your workspace.
- Upload your samples just as you would for other analysis. Your metadata.tsv file should contain at minimum the headers
entity:sample_id,Read_1, andRead_2in a tab delaminated file. Once files are uploaded proceed to importing the workflow into your workspace. - Email HAISeq@cdc.gov, with the subject line "krakenDB invite request" to request access to the sharefile link and provide the email address to send invite to. Download the
hash.k2d,opts.k2d, andtaxo.k2dfiles needed for PHoeNIx from the CDC sharefile link. You CANNOT use a different krakenDB for this as it needs to match thektax_map.k2file that is included in the pipeline. At this time this is not downloadable via command line. - Upload the
hash.k2d,opts.k2d, andtaxo.k2dfiles into a google bucket folder either in your google cloud workspace or under the "Data" tab in your workspace use the left hand navigation pane to go to the "Files" tab and click the blue "Upload" button in the upper right hand corner. - Under the "Data" tab in your workspace use the left hand navigation pane to go to the "Workspace Data" tab. Create a Key/Value pair for the uploaded kraken2 database.
- The key is just a string of your choosing.
- The value should be the google bucket location of the kraken2 database folder where the
hash.k2d,opts.k2d, andtaxo.k2dfiles can be found. You can find the hyperlink by going to "Files" tab and right clicking on the kraken2_db folder you uploaded and then click "copy link address" in the pop up menu. This can then be copied to the value field in the "workspace data" tab.
Steps 4
- Under the workflows tab click the
+blue circle in the "Find a workflow" box to add a new workflow. - In the pop-up window click dockstore, which will take you to the dockstore website where we will search for the PHoeNIx workflow.
Steps 5-6
- Search "phoenix" in the search bar of the dockstore webpage.
- The PHoeNIx workflow should then appear in the search output. Make sure it says "WDL" under the format column as there is also a nextflow version of the pipeline that will not work on Terra. Click the workflow hyperlink.
Steps 7-8
- Now you will should be in a dockstore page for the PHoeNIx workflow. Click on the latest version of the pipeline on the right hand side of the page in the "recent versions" menu. The greyed out "Terra" button should now turn blue. Click it.
Step 9
- Select the Destination Workspace you want to import the workflow into from the drop down menu. Then click the blue "import" button.
Step 10
- Importing the workflow should immediately take you to its workflow space in your chosen workspace. Click the "Outputs" table and then click the "Use defaults" hyperlink to auto fill the output names. If you forget to do this you won't have output saved!
Step 11
- Click the "Select Data" blue button and select the samples you want to analyze from the pop up window. Then click save to close the pop up window.
- Click the "Inputs tab" and fill in the following REQUIRED fields.
-
kraken2db-workspace.kraken2_db(here kraken2_db should be the key you used when you added the kraken database to your workspace) -
read1-this.read_1(here "read_1" should match the name of the 2nd column in your metadata.tsv file) -
read2-this.read_2(here "read_2" should match the name of the 3rd column in your metadata.tsv file) -
samplename- this.sample_id (here "sample_id " should match the name of the 1st column in your metadata.tsv file)
- There are optional fields for
CPU,disk_sizeandmemorythat you can adjust if there are errors regarding lack of resources. You will need at least >40GB of memory. DO NOT add anything for the docker option. - Click the blue "Save" button on the right hand side of the page and this will cause the greyed out "RUN ANAYLISIS" to turn blue. Click "RUN ANAYLISIS" and this will launch the pipeline.
Step 12-15
- Once your run is complete navigate to the "DATA" tab and click on "sample" on the left hand navigation pane.
- Click the blue gear "SETTINGS" button above the table. This will open a pop up menu of all the output that is produced by PHoeNIx.
- Select the following fields and place them in this order:
- qc_outcome
- warning_count
- coverage
- genome_length
- assembly_ratio
- scaffold_count
- species
- taxa_confidence
- taxa_source
- mlst_1
- mlst_scheme_1
- mlst_2
- mlst_scheme_2
- gc_percent
- kraken2_trimmed
- kraken2_weighted
- beta_lactam_resistance_genes
- other_ar_genes
- hypervirulence_genes
- amrfinder_point_mutations
- qc_reason
- Click "save this column selection" and give it a name so we can load this column selection quicker next time.
- These fields will be the same as those in the
Phoenix_Output_Report.tsvfile that is an overview of the entire run. - All files in from the phoenix run on a sample are available for download in a zipped file that is found in the
full_resultscolumn. Or you can download a particular file by selecting the column from the "settings" button and then clicking the hyperlink found in that column. - You will probably also want to have a look at the
synopsisfile that is found in thesynopsiscolumn, which well explain the WARNINGS and ALERTS for a particular sample.
- Home
- Dependencies and Install
- Running PHoeNIx
- Pipeline Overview
- Documentation for Databases
- Running PHoeNIx on Different Systems
- Versioning Control and Reproducibility
- Troubleshooting
- Guidance
- Contributing and Issues
- Beta Testing