Skip to content

Commit

Permalink
DATAOPS-716 Use customized list of adapters, FastQC (#60)
Browse files Browse the repository at this point in the history
* Use customized list of adapters, FastQC

When hoovering over the adapter content plot in the the FastQC output
displayed in the end of all seqreports the name of the adapter found
is appearing. The adapters and names used are by default the ones
specified in the FastQC software. However, the provided list is outdated
and many of the adapters are used in several library preparation kits. A
customized list can now be used as input instead to look for adapters we
use at SNP&SEQ and to display relevant names when found.

Files changed:
- New file, adapter_list_fastqc.txt, added in config/tool_config/ to
  specify the adapters to look for.
- The fastqc command in main.nf is now updated with the additional
  a-flag that is used to specify the use of the file described under the
previous point.

* Update config/tool_config/adapter_list_fastqc.txt

Co-authored-by: Matilda Åslin <matilda.aslin@medsci.uu.se>

* Update config/tool_config/adapter_list_fastqc.txt

Co-authored-by: Matilda Åslin <matilda.aslin@medsci.uu.se>

* Fixed indentation and permalink

---------

Co-authored-by: Matilda Åslin <matilda.aslin@medsci.uu.se>
  • Loading branch information
monikaBrandt and matrulda authored Jun 28, 2024
1 parent 809cc46 commit 022c999
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
31 changes: 31 additions & 0 deletions config/tool_config/adapter_list_fastqc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This file is copied and modified from
# https://github.com/s-andrews/FastQC/blob/1faeea0412093224d7f6a07f777fad60a5650795/Configuration/adapter_list.txt
# The file has been modified according to
# https://knowledge.illumina.com/library-preparation/general/library-preparation-general-reference_material-list/000001314
#
# This file contains a set of sequence fragments which will be explicitly
# searched against your library. The reporting will be similar to the
# Kmer plot, except that every sequence in this list will be shown so
# you can use this to judge the level of adapter read-through even if those
# adapter sequences aren't picked out by the Kmer module.
#
# Since every sequence here will be analysed and the results plotted it
# doesn't make any sense to include duplicate sequences, or to add too
# many sequences since your plot will end up a mess.
#
# You can add more sequences to the file by putting one line per entry
# and specifying a name[tab]sequence. If the contaminant you add is
# likely to be of use to others please consider sending it to the FastQ
# authors, either via a bug report at www.bioinformatics.babraham.ac.uk/bugzilla/
# or by directly emailing simon.andrews@babraham.ac.uk so other users of
# the program can benefit.
#
# For the time being it's going to be easier to interpret this plot if all
# of the sequences provided are the same length, so we've gone with 12bp
# fragments for now.

Illumina TruSeq Adapter AGATCGGAAGAG
Illumina TruSeq Small RNA Adapter TGGAATTCTCGG
Illumina Stranded Total RNA Prep CTGTCTCTTATA
PolyA AAAAAAAAAAAA
PolyG GGGGGGGGGGGG
10 changes: 6 additions & 4 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,11 @@ workflow CHECK_RUN_QUALITY {
GET_QC_THRESHOLDS(run_folder)
GET_METADATA(run_folder)
project_and_reads = get_project_and_reads(params.run_folder)
FASTQC(project_and_reads)
FASTQC(project_and_reads,
params.config_dir)
FASTQ_SCREEN(project_and_reads,
params.config_dir,
params.fastqscreen_databases)
params.config_dir,
params.fastqscreen_databases)
MULTIQC_PER_FLOWCELL( params.run_folder,
FASTQC.out.map{ it[1] }.collect(),
FASTQ_SCREEN.out.results.map{ it[1] }.collect(),
Expand Down Expand Up @@ -168,14 +169,15 @@ process FASTQC {

input:
tuple val(project), path(fastq_file)
path config_dir

output:
tuple val(project), path("*_results")

script:
"""
mkdir -p $fastq_file"_fastqc_results"
fastqc -t ${task.cpus} -o $fastq_file"_fastqc_results" $fastq_file
fastqc -t ${task.cpus} -a "${config_dir}/adapter_list_fastqc.txt" -o $fastq_file"_fastqc_results" $fastq_file
"""
}

Expand Down
1 change: 1 addition & 0 deletions test_data/test_config/adapter_list_fastqc.txt

0 comments on commit 022c999

Please sign in to comment.