Psilocybin study - Upload, QC and trimming
OverviewQuestions:
Objectives:
This example analyzes the transcriptome changes in the mouse prefrontal cortex after treatment with psilocybin (a psychedelic substance).
This tutorial starts with finding and considering datasets to use, their quality control and improvements.
Requirements:
Evaluate the quality of published data regarding its experimental setup, repository information and the sequenced reads.
Apply the initial steps of RNA-seq data processing to the example data, and afterwards to your own selected RNA-seq data set from a publication in the area of your interest.
Time estimation: Hands-on ~1h, waiting times in between might be several hoursSupporting Materials:Published: Nov 2, 2026Last modification: Nov 2, 2026License: Tutorial Content is licensed under Creative Commons Attribution 4.0 International License. The GTN Framework is licensed under MITversion Revision: 0
Hints for tutorial creation
- bold “TODO” or just 2 asterisks at front and end
- italics 1 asterisk at front and end
- weblinks: doi2bib.org
- comments:
- subsection: < at start of line
- title levels: #, ##, …
- drop-down selections:
SRR_Acc_List.txt - images:
- citations:
- badding citations to the bibliography file (
tutorial.bibfile next to yourtutorial.mdfile) - citations must be in bibtex format. Get via using doi2bib.org and entering the DOI
- cite:
{% cite Batut2018 %}. will be rendered like this: Batut et al. 2018, and links to a bibliography section which will automatically be created at the end of the tutorial.
- badding citations to the bibliography file (
Tutorial
This tutorial shows you step-by-step how to process your self-selected RNA-seq dataset from a publication in the area of your interest. It uses a dataset selected by previous students which fulfills many requirements for a nice example dataset:
- It has a clear experimental setup (4 groups with 8 mice each).
- It has a well-understandable rationale and its results indicate which samples make sense to process.
- It has more than just 3 replicates, allowing experimenting with the number of replicates.
- The individual samples are of moderate size.
- It has a rather complete documentation of data availability, data description, analysis description and even available code.
- It’s data and publication is open-access.
In short, the study by Fadahunsi et al. 2022: Acute and long-term effects of psilocybin on energy balance and feeding behavior in mice, tests the effect of the psychedelic “Psilocybin” on obesity-related aspects in mice. Although there is no effect shown on obesity-related aspects, psilocybin induces a change in gene expression in the prefrontal cortex 3h after injection.
We will start with selecting and uploading data, doing quality control (QC) and trimming.
AgendaIn this tutorial, we will cover:
Identify and get RNA-seq datasets
To use publically available, you first need to understand what the analysis and the data is about. After you read a paper, you should have a first idea of which samples were created and how (Materials & Methods). In the results, you can identify which samples might be interesting to re-analyze
Access data repositories
Often, data from a publication has GEO (Gene Expression Omnibus) link, or links to the NCBI SRA (Sequence Read Archive) - either by a BioProject identifier (PRJNA number) or the separate SRA IDs.
Select your data via the SRA Run Selector
Hands On: Using the SRA Run Selector
- Go to the SRA Run Selector
- Go to the GEO link provided in the publication (GSE209859), then click on the link for SRA Run Selector at the bottom of the page
- Alternatively, go directly to the SRA Run Selector where the PRJNA needs to be entered. The PRJNA is provided in the GEO site and sometimes directly in the publication.
- Also, get familiar with how a BioProject with a PRJNA number is displayed at NCBI (PRJNA862729)
- Select the samples to use
- Use the “Filters List” in the left panel, set checkmarks for “timepoint” and “tissue” and select “3h post-injection” and “frontal cortex”.
- Select the samples:
- SRR20665143
- SRR20665156
- SRR20665172
- SRR20665183
- SRR20665154
- SRR20665173
- SRR20665189
- SRR20665206.
- In the upper section, in the row for “Selected” click on “Accession List”.
- Save the downloaded file.
Selecting samples and getting the Accession List created is more foolproof then copy-and-paste or even typing the SRA numbers. Also, the order or the SRR identifiers in the list follows the order in which you clicked on them. You can thus first select all control and then all treatment samples (as we did).
Question: Questions about the samples
- Why are there in total 128 samples in the SRA Run Selector although there are only 64 SRA Experiments stated under the PRJNA BioProject?
- What might be the reason for selecting the listed datasets (#1,6,8,16,17,23,25,32)?
- Approximately how many “reads” are there per dataset? (For this, divide the number of bases by the read length).
- Each SRA Experiment had 2 Runs (technical replicates; sample split onto likely 2 flowcells for sequencing). In the Run Selector, #1 and #2, are the same “BioSample”.
- There are 2 conditions (psilocybin and saline). Each has 8 biological samples of which we selected 4 each. We did pay attention to have only 1 Run per BioSample and that the sequencing depth is similar for all (~1.3 Gigabases = 1,300,000,000 bases).
- There are ~1.3 billion bases per dataset (as seen in the SRA Run Selector), and the read length is 52 bp (according to the Materials & Methods section). Thus, there are ~25 million reads per dataset. This is at the lower end of recommendations for mammalian RNA-seq (30-50 million reads).
Get the data
Hands On: Data Upload
- Create a new history for this tutorial
- To create a new history simply click the new-history icon (+) at the top of the history panel
- galaxy-pencil Rename the history into
Psilocybin Tutorial - upload and QC- galaxy-upload Upload the list created by the SRA Run Selector
- In the left panel, click on “Upload”, then choose the local file or drag-and-drop it.
- Use the tool Faster Download and Extract Reads in FASTQ ( Galaxy version 3.1.1+galaxy1) with the following parameters:
- “select input type”:
List of SRA accession, one per line- param-file “sra accession list”: select
SRR_Acc_List.txt(Input)- galaxy-pencil Rename the resulting collection containing data into
Raw data (paired-end).Tag the whole collection with
#raw_data
- Unfortunately, renaming files uploaded as such a collection does not work. Alternatively, uploading all files separately, renaming them and then building a list might be a fix for that.
Question: Questions about the collection
- How many items do you now have in your history?
- Why do you now have 16 separate items in the collection, instead of just the 8 datasets you listed?
- There should be 5 visible items. The “SRR_Acc_List.txt”, plus 4 items created by the tool. Not all of these items are filled. Only the “fasterq-dump log” contains 1 item, and the “Pair-end data (fasterq-dump) contains 8 dataset pairs. All in all, it’s 17 items. The next history item likely get number 18.
- The psilocybin data is paired-end data. In each of the SRR datasets, there are forward and reverse reads. The tool already separates them into forward and reverse reads in preparation for the next steps.
QC of raw data
Since many steps from biological sampling via library preparation, sequencing and initial data processing can introduce issues to the data, it’s best to always check the quality of raw RNA-seq data yourself. This Quality Control (QC) will often show more issues in the case of older data or difficult samples while highlighting the high quality of other data. Until recently, the tool “FastQC” was THE tool to use which is now replaced by the tool “Falco” which implements this QC faster.
Flatten and relabel the collection
Comment: Why to flatten and relabel?These steps are optional but helpful. If they are omitted, summarizing the output from the QC tool will collectively state the quality of all forward and all reverse reads. Try it!
Hands On: Make a simple re-labelled list out of a paired-end collection
- Flatten collection with the following parameters:
- param-file “Input Collection”:
list_paired(output of Faster Download and Extract Reads in FASTQ tool)- Under “Additional options”: “Output tags”: type
#flattened- hands_on Create a .txt file with your new labels
- Use e.g. Excel or a text editor to expand the file
SRR_Acc_List.txtintoSRR_Acc_List_Names.txtto contain a clear name behind the SRR identifier (with a tab in between), e.g.:- SRR20665143-forward saline#1-fw
- SRR20665156-forward saline#2-fw
- SRR20665172-forward saline#3-fw
- SRR20665183-forward saline#4-fw
- SRR20665154-forward psilocybin#1-fw
- SRR20665173-forward psilocybin#2-fw
- SRR20665189-forward psilocybin#3-fw
- SRR20665206-forward psilocybin#4-fw
- SRR20665143-reverse saline#1-rv
- SRR20665156-reverse saline#2-rv
- SRR20665172-reverse saline#3-rv
- SRR20665183-reverse saline#4-rv
- SRR20665154-reverse psilocybin#1-rv
- SRR20665173-reverse psilocybin#2-rv
- SRR20665189-reverse psilocybin#3-rv
- SRR20665206-reverse psilocybin#4-rv
- galaxy-upload Upload your file
SRR_Acc_List_Names.txt
- In the left panel, click on “Upload”, then choose the local file or drag-and-drop it.
- Relabel identifiers with the following parameters:
- param-file “Input Collection”:
output(output of Flatten collection tool)- “How should the new labels be specified?”:
Map original identifiers to new ones using a two-column table.
- param-file “Identifier mapping”:
output(Input dataset)- Under “Additional options”: “Output tags”: type
#relabelled- galaxy-pencil Rename the resulting collection into
Raw data (flattened, relabelled) - datset xx and collection xx.While it is good practice and helpful to rename a file into e.g. “raw data”, “gene counts”…, it is often necessary to trace back your steps. If you leave the source history items in it as well, e.g. “from collection xx and dataset xx”.
Question: Questions about flattening and relabelling
- Is the label in the history and the item name the same?
- After relabeling, what is the item file name?
- No, unfortunately it’s not: The history items have a hyphen betweeen the SRR ID and “forward/reverse” while the item name has a colon. This can be seen when clicking onto the eye icon on the history item, and switching to “Details” in the middle panel in Galaxy.
- Even after relabeling, the item file name stays the same (e.g.
SRRxxxxx:forward)
Quality control of raw reads with Falco and MultiQC
Hands On: Quality control
- Falco ( Galaxy version 1.3.2+galaxy0) with the following parameters:
- param-file “Raw read data from your current history”:
Raw data (flattened, relabelled) - datset xx and collection xx(output of Relabel identifiers tool)- “Generate summary output of QC test results”:
Yes- Under “Additional options”: “Output tags”: type
#QC- galaxy-pencil Rename the resulting collection into
QC on raw data (Falco on collection xx).Comment: FASTQC vs. FalcoA very commonly used tool for read quality control is FASTQC. Falco provides the same functions but runs far faster. For MultiQC, both FASTQC and Falco output are treated as if stemming from FASTQC.
- MultiQC ( Galaxy version 1.35+galaxy4) with the following parameters:
- In “Results”:
- param-repeat “Insert Results”
- “Which tool was used to generate logs?”:
FastQC
- In “FastQC output”:
- param-repeat “Insert FastQC output”
- param-file “FastQC output”:
QC on raw data (Falco on collection xx)(output of Falco tool)- “Report title”:
Falco on raw data (psilocybin)Comment: MultiQCMultiQC can summmarize results from many different tools. It’s helpful to use it for collection to have all results in one view wihout the need to click through every single one.
For more information on the separate aspects checked in QC, consult the [QC tutorial] (https://training.galaxyproject.org/training-material/topics/sequence-analysis/tutorials/quality-control/tutorial.html).
Question
- What do you think of the overall quality of the RNA-seq datasets?
- Do you notice general differences between the read quality of forward and reverse reads?
- The overall quality is rather high. Only few aspects are flagged, such as “Per sequence GC Content”.
- The reverse reads are of lower quality. (Reasons for that can be found in the [QC tutorial] (https://training.galaxyproject.org/training-material/topics/sequence-analysis/tutorials/quality-control/tutorial.html).
Improving read quality by trimming fastp
Hands On: Trimming with **fastp**
- fastp ( Galaxy version 1.3.7+galaxy0) with the following parameters:
- “Single-end or paired reads”:
Paired Collection
- param-file “Select paired collection(s)”:
Raw data (paired-end)(output of Faster Download and Extract Reads in FASTQ tool)- In “Adapter Trimming Options”:
- “Adapter sequence auto-detection for paired-end”:
Yes- In “Overrepresented Sequence Analysis”:
- “Enable overrepresented analysis”:
Yes- In “Filter Options”:
- In “Quality filtering options”:
- “Qualified quality phred”:
30- In “Duplicated Reads Options”:
- “Enable duplicated reads analysis”:
Disable (--dont_eval_duplication)- MultiQC ( Galaxy version 1.35+galaxy4) with the following parameters:
- In “Results”:
- param-repeat “Insert Results”
- “Which tool was used generate logs?”:
fastp
- param-file “Output of fastp”:
report_json(output of fastp tool)- “Report title”:
Processing with fastp
TODO: Consider adding a question to test the learners understanding of the previous exercise
Question
- Question1?
- Question2?
- Answer for question1
- Answer for question2
Sub-step with Falco
Hands On: Task description
- Falco ( Galaxy version 1.3.2+galaxy0) with the following parameters:
- param-file “Raw read data from your current history”:
output_paired_coll(output of fastp tool)TODO: Check parameter descriptions
TODO: Consider adding a comment or tip box
Re-arrange
To create the template, each step of the workflow had its own subsection.
TODO: Re-arrange the generated subsections into sections or other subsections. Consider merging some hands-on boxes to have a meaningful flow of the analyses
Conclusion
Sum up the tutorial and the key takeaways here. We encourage adding an overview image of the pipeline used.