Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to CNV workflow #1

Open
sirselim opened this issue Dec 13, 2022 · 3 comments
Open

Update to CNV workflow #1

sirselim opened this issue Dec 13, 2022 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@sirselim
Copy link
Collaborator

I had some time recently for another job to better implement the CNV module/workflow. It's still not great, the main branch needs some more love, but the below should get you 99% of the way towards working code.

#!/bin/bash -l

# check and grab latest wf (if wanted)
nextflow pull epi2me-labs/wf-cnv

# define variables
WKDIR='/data/basecalled/AGRF'
SAMPLE='Diabetes_A'
REFERENCE='/public-data/references/GRCh38/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna'
NFCONFIG='/public-data/configs/nextflow_local_overide.config'
THREADS='48'

# EPI2ME Labs CNV workflow
# nextflow -c "${NFCONFIG}" run epi2me-labs/wf-cnv \
#   -resume \
#   --threads "$THREADS" \
#   -profile standard,local \
#   --fastq "${WKDIR}"/"${SAMPLE}"/pass/ \
#   --sample "${SAMPLE}" \
#   --fasta "${REFERENCE}" \
#   --genome hg38 --bin_size 500 \
#   --map_threads 24


# EPI2ME Labs CNV workflow
nextflow -c "${NFCONFIG}" run epi2me-labs/wf-cnv \
  -resume \
  --threads "$THREADS" \
  -profile standard,local \
  --fastq "${WKDIR}"/"${SAMPLE}"/pass/fastq/ \
  --sample_sheet sample_sheet.csv \
  --fasta "${REFERENCE}" \
  --genome hg38 --bin_size 500 \
  --map_threads 24


# Notes:
# EPI2ME Labs workflow for ONT CNV analysis: https://github.com/epi2me-labs/wf-cnv
#  CNV pipeline will run on the basecalled fastq files, it will run an alignment against 
# the provided reference genome, and then perform CNV analysis using QDNAseq.

# there is currently a fun little issue with the CNV pipeline needing a sample sheet
# it also seems to ignore non-compressed fastq files, so run:
# for file in *.fastq ; do 
#   echo -e "... processing $file ...";
#   bgzip "$file";
#   echo -e "... done ...";
# done
# NOTE: it also seems that the gz fastq files have to be in a folder called fastq...

# sample sheet looks like this:
# barcode,sample_id,type
# barcode01,Diabetes_A,AGRF_Diabetes
@sirselim sirselim added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 13, 2022
@leahkemp
Copy link
Owner

Wicked thanks for sharing your code Miles, I've implemented it and will test/refine it when I get to that section of the code :)

@leahkemp
Copy link
Owner

5daf211

@sirselim sirselim reopened this Feb 6, 2023
@sirselim
Copy link
Collaborator Author

sirselim commented Feb 6, 2023

Reopening this due to a big update in the wf-cnv workflow. You no longer are required to use a samplesheet or just fastqs. Bams are now a valid entry point which massively speeds up the CNV calling process. Some example code:

#!/bin/bash -l

# check and grab latest wf (if wanted)
nextflow pull epi2me-labs/wf-cnv

# define variables
WKDIR='/data/basecalled/AGRF'
SAMPLE='Control'
REFERENCE='/public-data/references/GRCh38/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna'
NFCONFIG='/public-data/configs/nextflow_local_overide.config'
THREADS='48'


# EPI2ME Labs CNV workflow
nextflow -c "${NFCONFIG}" run epi2me-labs/wf-cnv \
  -resume \
  --threads "$THREADS" \
  -profile standard,local \
  --bam "${WKDIR}"/"${SAMPLE}"/bam/"${SAMPLE}"_sorted_merged.hp.bam \
  --sample "${SAMPLE}" \
  --fasta "${REFERENCE}" \
  --genome hg38 --bin_size 500 \
  --map_threads 24


# Notes:
# EPI2ME Labs workflow for ONT CNV analysis: https://github.com/epi2me-labs/wf-cnv
# CNV pipeline will run on the basecalled fastq files or aligned bams, 
# and then perform CNV analysis using QDNAseq.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants