Package: panpiper
PanpiperThis package conducts bacterial isolate analysis for one species.AssemblyUsingshovillthe paired fastq files are assembled and sorted into ones which pass and fail assemblyQuality controlThe assemblies are analyzed withCheckMandFastANIBased on user-defined thresholds the samples are sorted into ones which pass or don't pass requirementsPangenome analysisA pangenome is created with the assemblies usingPanarooand annotated withAMRFinderPlus,Bakta,EggNOG-mapper, andKraken2The core genome alignment is used to create a phylogenetic tree withFastTree,RAxML, andIQ-TREEThe samples are divided into phylogroups withPopPUNKGenome-wide association studyThe pangenome is used with a continuous or binary phenotype to conduct a genome-wide association study withPyseerThe wrapper scripts used to analyze and filter the data are predominantly taken from the pyseer package.Note: Be sure to cite all packages used in the pipeline.Credit: This package structure was inspired by the snakemake workflowMAGinatorInstallationCreate package and install dependenciescondacreate-npanpiper-cbioconda-cconda-forgesnakemakemamba
condaactivatepanpiper
pipinstallpanpiperDownload databasesThe databses necessary will be downloaded automatically except in the case of Kraken2 and EggNOG-mapper. These databases have already been downloaded and are maintained in the package structure. In the case that you would like to use your own database, these databases can be downloaded into user-defined directories and can be referenced in the arguments as followspanpiper...--kraken_dir{directory}--eggnog_dir{directory}--bakta_dir{directory}WorkflowNote: The first time these functions are run, they will take a couple minutes before the workflow starts running because the conda dependendies need to be downloaded before start.Assembly:The fastq files should all be in a single directory. They need to be paired-end.panpiper-wassembly-o{outputdirectory}-q{fastqdirectory}Output:Assembly/incomplete_assembly_files.txt - samples for which assembly failedcomplete_assembly_files.txt - samples for which assemblies passed{sample}/contigs.fa - edited assemblyQuality control:The fasta file directory should contain a subdirectory for each sample where the subdirectory name is the sample of the sample. The fasta file within these directories should be formatted as contigs.fa. This is the standard output from Shovill. The sample list should have one sample name per line which corresponds to the directory names. The reference fasta file should be the representative strain of the species which the samples will be compared to using average nucleotide identity.Additional parameters that may be included:--ani_cutoff : percent identity to reference cutoff (default 95)--n50 : N50 cutoff (default 5000)--contig_number : number of contigs cutoff (default 1000)panpiper-wquality-o{ouputdirectory}-a{fastadirectory}-s{samplelist}-r{referencefastafile}Output:Quality/sample_list.txt - samples which passed all requirementsfailed_samples_checkm.csv  - samples which did not meet checkM thresholdsfailed_samples_ani.csv  - samples which did not meet ANI thresholdquality_report.html - html to view the summary of quality of assembliesCheckM/checkm_stats.txt - statistics summary of assembliescheckm_log.txt  - summary of contamination, completeness, and strain heterogeneitycheckm_log_filter.txt - reformat and filter of checkm_log.txtFastANI/fastani_summary.txt - lists percent identity of each sample to the referencefastani_reformat.csv - reformat of the same fileAssembly_filter/{sample}/ - includes the filtered fasta files removing contigs less than 500bp and all CheckM informationPangenome:The fasta file directory should contain a subdirectory for each sample where the subdirectory name is the sample of the sample. The fasta file within these directories should be formatted as contigs.fa. This is the standard output from Shovill. The sample list should have one sample name per line which corresponds to the directory names. The reference fasta file should be the representative strain of the species which the samples will be compared to using average nucleotide identity.panpiper-wpangenome-o{ouputdirectory}-a{fastadirectory}-s{samplelist}-r{referencefastafile}Output:Pangenome/Bakta/{sample}/ - contains Bakta output for each sampleUnitig/unitig.pyseer.gz - the full unitig summary of all samplesPhylogeny/ - contains the intermediate treesPanaroo/ - contains the full pangenome summary as well as Bakta annotation for the pangenomeAMR/ - contains the full AMR report for each sampleKraken/ - contains the full Kraken report for each samplePhylogroups/ - contains the full division process for phylogroupsSummary/AMR.txt - the summary of AMR hitsamr.png - visualization of AMR as a heatmapamr_wide.txt - reformat of AMR hits from long to widecore_gene_alignment.aln.iqtree - the final nwk treedb_clusters.csv - the final phylogroup clusterskrakn_ag.txt - the full kraken summarymash.tsv - the full mash distance matrixpan_genome_reference.faa - all the proteins in the pangenomepan_genome_reference.tsv - the list of all proteins in the pangenomeSummary.emapper.annotations - Eggnog-Mapper annotationGenome-wide association study:The gene and structure presence/absence files should be the result of Panaroo or Roary - from Panaroo this is the .RTab file. The unitig file is a result of unitig-caller; this file should be gzipped. The tree file can be any newick tree - if this pipeline has been followed to this point, we would recommend the tree file from iqtree. Finally, the reference file is a tab-delimited list of files to be used for unitig annotation. The format is file.fna file.gff2 {draft, ref}.panpiper-wpyseer-o{ouputdirectory}-g{genepresenceabsencefile}-p{structurepresenceabsencefile}-u{unitigfile}-t{treefilefromiqtree}-r{referencefile}Output:Pyseer/{variable_name}/unitig_pattern_count.txt - a summary of tests conducted for p-value correctionunitig_gene_hits.txt - the genes which significant unitig hits match tounitig.txt - the association study results for each unitigsignificant_unitig.txt - the unitig.txt file filtered for significancestruct_analysis.txt - the associtaiton study results for each structural variantsignificant_structure.txt - the structural variant results filtered for significancegene_analysis.txt - the associtaiton study results for each genesignificant_genes.txt - the gene results filtered for significancephylogeny_similarity.tsv - a matrix of similarity to use as a covariate to correct for population structure in the modelRun on a compute clusterTo run on a compute cluster, a profile folder must be specified which should contain a config.yaml file. Details on what to include in the config file can be foundhere.panpiper...--cluster--profile{profilefolder}Potential errorsKraken - "Error loading hash table" - you may need to request more memoryKraken - database download errors - I suggest downloading the database manually as it can be very glitchy