Stacks RAD-seq reference-guided workflow
v1.1

Workflow Type: Galaxy

workflow-ref-guided-stacks

These workflows are part of a set designed to work for RAD-seq data on the Galaxy platform, using the tools from the Stacks program.

Galaxy Australia: https://usegalaxy.org.au/

Stacks: http://catchenlab.life.illinois.edu/stacks/

Inputs

  • demultiplexed reads in fastq format, may be output from the QC workflow. Files are in a collection.
  • population map in text format
  • reference genome in fasta format

Steps and outputs

BWA MEM 2:

  • The reads are mapped to the reference genome; output in BAM format
  • The collection of bam files is named something like Map with BWA-MEM on collection 5 (mapped reads in BAM format)
  • Each of the bam files in the collection is named something like sample_CAAC

Samtools stats before filtering:

  • These bam files are sent to Samtools stats to get statistics; these are then sent to MultiQC to provide a nice output. This is tagged as "bam stats before filtering" in the Galaxy history.
  • The "General Statistics" show how many reads were mapped - if there is a low mapping rate, it may be worth re-checking or repeating QC on the raw reads, or considering a different reference genome, or using a de novo approach. To see if many reads have been soft-clipped by Bwa mem (which may affect how well gstacks can work), look at the "Alignment Metrics" section, and the row with "Mapped bases (Cigar)". Hover over the dots to see sample names especially towards the left of the row - these have the least mapped reads.

Samtools view:

  • This step filters out certain reads from the bam files. The default settings are to exclude reads if they are unmapped, if the alignment is not primary or is supplementary, if the read fails platform/vendor quality checks, and if the read is a PCR or optical duplicate.
  • The output bams are tagged with "filtered bams" in the Galaxy history.

Samtools stats after filtering:

  • Filtered bams are sent again to samtools stats, and statistics to MultiQC, with the report tagged as "bam stats after filtering" in the Galaxy history.

gstacks:

  • Filtered bams and a population map are sent to gstacks. The outputs are:
  • Catalog of loci in fasta format
  • Variant calls in VCF format
  • Note: some bam files cause errors here with gstacks. For example, the log file may say "Error, all records discard with file SampleXYZ.FASTQ.bam, Aborted". If this occurs, check the bam stats (as described above). Some of the options are to re-do QC on the raw reads, change settings for mapping reads in BWA MEM, and/or delete this sample/s from the population map and proceed to gstacks. The sample can still remain in the list of bam files but gstacks will only consider what is listed in the pop map.

populations:

  • gstacks outputs and a population map are snet to the "populations" module. The outputs are:
  • Locus consensus sequences in fasta format
  • Snp calls, in VCF format
  • Haplotypes, in VCF format
  • Summary statistics

qc-wf

Steps

ID Name Description
3 BWA-MEM2 toolshed.g2.bx.psu.edu/repos/iuc/bwa_mem2/bwa_mem2/2.2.1+galaxy0
4 Samtools stats: BAM stats before filtering toolshed.g2.bx.psu.edu/repos/devteam/samtools_stats/samtools_stats/2.0.3
5 Samtools view: filters out unmapped and non-primary mapped reads (see flags) toolshed.g2.bx.psu.edu/repos/iuc/samtools_view/samtools_view/1.13+galaxy2
6 MultiQC: BAM stats before filtering toolshed.g2.bx.psu.edu/repos/iuc/multiqc/multiqc/1.11+galaxy0
7 Stacks2: gstacks toolshed.g2.bx.psu.edu/repos/iuc/stacks2_gstacks/stacks2_gstacks/2.55+galaxy2
8 Samtools stats: BAM stats after filtering toolshed.g2.bx.psu.edu/repos/devteam/samtools_stats/samtools_stats/2.0.3
9 Stacks2: populations toolshed.g2.bx.psu.edu/repos/iuc/stacks2_populations/stacks2_populations/2.55+galaxy2
10 MultiQC: BAM stats after filtering toolshed.g2.bx.psu.edu/repos/iuc/multiqc/multiqc/1.11+galaxy0

Version History

v1.1 (earliest) Created 31st May 2022 at 08:20 by Anna Syme

Update README.md


Frozen v1.1 6b19323
help Creators and Submitter
Creator
Submitter
Activity

Views: 4906   Downloads: 226   Runs: 2

Created: 31st May 2022 at 08:20

Annotated Properties
Topic annotations
Operation annotations
help Tags

This item has not yet been tagged.

help Attributions

None

Total size: 357 KB
Powered by
(v.1.16.0-main)
Copyright © 2008 - 2024 The University of Manchester and HITS gGmbH