diff --git a/PC.nf b/PC.nf index cbea800..d002574 100644 --- a/PC.nf +++ b/PC.nf @@ -8,7 +8,6 @@ nextflow.enable.dsl=2 // import modules include { INPUT_CHECK } from './modules/local/input_check.nf' include { generate_whitelist as whitelist_experimental ; generate_whitelist as whitelist_spikein } from './modules/local/generate_whitelist.nf' -include { CUSTOM_GETCHROMSIZES } from './modules/nf-core/modules/custom/getchromsizes/main.nf' include { FASTQC_TRIMGALORE } from './modules/local/fastqc_trimgalore.nf' include { BOWTIE2_BUILD as BOWTIE2_BUILD_EXPERIMENTAL ; BOWTIE2_BUILD as BOWTIE2_BUILD_SPIKEIN } from './modules/nf-core/modules/bowtie2/build/main.nf' include { CHROMAP_INDEX as CHROMAP_INDEX_EXPERIMENTAL ; CHROMAP_INDEX as CHROMAP_INDEX_SPIKEIN } from './modules/nf-core/modules/chromap/index/main.nf' @@ -43,13 +42,19 @@ workflow { params.skip_trimming ) - // Setting up channels based on parameter selections for experimental and spike-in genomes. Create index for chosen aligner if not supplied. + // Setting up channels based on parameter selections for experimental and spike-in genomes. ch_experimental_fa = Channel.empty() ch_spikein_fa = Channel.empty() ch_experimental_bowtie2_index = Channel.empty() ch_experimental_chro_index = Channel.empty() ch_spikein_bowtie2_index = Channel.empty() ch_spikein_chro_index = Channel.empty() + ch_experimental_gtf = Channel.empty() + ch_experimental_blacklist = Channel.empty() + ch_spikein_blacklist = Channel.empty() + ch_macs_gsize = Channel.empty() + + // Create index for chosen aligner if not supplied and set up channels for experimental and spike-in genomes if (params.experimental == 'human') { ch_experimental_fa = params.human_fa if (params.aligner == 'chromap') { @@ -268,10 +273,6 @@ workflow { ch_spikein_blacklist = params.fly_blacklist } - CUSTOM_GETCHROMSIZES ( - ch_experimental_fa - ) - whitelist_experimental ( ch_experimental_fa, ch_experimental_blacklist @@ -619,7 +620,7 @@ workflow { macs2_bdgcmp ( macs2_peakcalling.out.chip_ctrl_bdg, - CUSTOM_GETCHROMSIZES.out.sizes, + whitelist_experimental.out.sizes, params.macs2_bigwig_method ) diff --git a/Run_example.sh b/Run_example.sh new file mode 100644 index 0000000..804e869 --- /dev/null +++ b/Run_example.sh @@ -0,0 +1,8 @@ +#!/bin/bash +#SBATCH --cpus-per-task=1 +#SBATCH --job-name=RunPerCell + +nextflow run PC.nf \ + -profile singularity \ + --human_fa '/path/to/downloaded/genome.fa' \ + --mouse_fa '/path/to/downloaded/genome.fa' \ No newline at end of file diff --git a/assets/blank_blacklist.bed.gz b/assets/blank_blacklist.bed.gz new file mode 100755 index 0000000..978a09b Binary files /dev/null and b/assets/blank_blacklist.bed.gz differ diff --git a/assets/dm6-blacklist.v2.bed.gz b/assets/dm6-blacklist.v2.bed.gz new file mode 100755 index 0000000..5bc98a5 --- /dev/null +++ b/assets/dm6-blacklist.v2.bed.gz @@ -0,0 +1 @@ +{"payload":{"allShortcutsEnabled":false,"fileTree":{"lists":{"items":[{"name":"Blacklist_v1","path":"lists/Blacklist_v1","contentType":"directory"},{"name":"metadata","path":"lists/metadata","contentType":"directory"},{"name":"ce10-blacklist.v2.bed.gz","path":"lists/ce10-blacklist.v2.bed.gz","contentType":"file"},{"name":"ce11-blacklist.v2.bed.gz","path":"lists/ce11-blacklist.v2.bed.gz","contentType":"file"},{"name":"dm3-blacklist.v2.bed.gz","path":"lists/dm3-blacklist.v2.bed.gz","contentType":"file"},{"name":"dm6-blacklist.v2.bed.gz","path":"lists/dm6-blacklist.v2.bed.gz","contentType":"file"},{"name":"hg19-blacklist-README.pdf","path":"lists/hg19-blacklist-README.pdf","contentType":"file"},{"name":"hg19-blacklist.v2.bed.gz","path":"lists/hg19-blacklist.v2.bed.gz","contentType":"file"},{"name":"hg38-blacklist.v2.bed.gz","path":"lists/hg38-blacklist.v2.bed.gz","contentType":"file"},{"name":"mm10-blacklist.v2.bed.gz","path":"lists/mm10-blacklist.v2.bed.gz","contentType":"file"}],"totalCount":10},"":{"items":[{"name":"bamtools","path":"bamtools","contentType":"submodule","submoduleUrl":"/pezmaster31/bamtools/tree/cbca090607f2154aa19c20ca778c3d067384b606","submoduleDisplayName":"bamtools @ cbca090"},{"name":"demo","path":"demo","contentType":"directory"},{"name":"lists","path":"lists","contentType":"directory"},{"name":".gitmodules","path":".gitmodules","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"Makefile","path":"Makefile","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"blacklist.cpp","path":"blacklist.cpp","contentType":"file"}],"totalCount":8}},"fileTreeProcessingTime":4.644946,"foldersToFetch":[],"reducedMotionEnabled":null,"repo":{"id":24994771,"defaultBranch":"master","name":"Blacklist","ownerLogin":"Boyle-Lab","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2014-10-09T15:12:34.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/7997361?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1542643152.0","canEdit":false,"refType":"branch","currentOid":"61a04d2c5e49341d76735d485c61f0d1177d08a8"},"path":"lists/dm6-blacklist.v2.bed.gz","currentUser":null,"blob":{"rawLines":null,"stylingDirectives":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/Boyle-Lab/Blacklist/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null,"repoAlertsPath":"/Boyle-Lab/Blacklist/security/dependabot","repoSecurityAndAnalysisPath":"/Boyle-Lab/Blacklist/settings/security_analysis","repoOwnerIsOrg":true,"currentUserCanAdminRepo":false},"displayName":"dm6-blacklist.v2.bed.gz","displayUrl":"https://github.com/Boyle-Lab/Blacklist/blob/master/lists/dm6-blacklist.v2.bed.gz?raw=true","headerInfo":{"blobSize":"1.62 KB","deleteInfo":{"deleteTooltip":"You must be signed in to make or propose changes"},"editInfo":{"editTooltip":"You must be signed in to make or propose changes"},"ghDesktopPath":"https://desktop.github.com","gitLfsPath":null,"onBranch":true,"shortPath":"1a45ec2","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FBoyle-Lab%2FBlacklist%2Fblob%2Fmaster%2Flists%2Fdm6-blacklist.v2.bed.gz","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":null,"truncatedSloc":null},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplateHelpUrl":"https://docs.github.com/articles/about-issue-and-pull-request-templates","issueTemplate":null,"discussionTemplate":null,"language":null,"languageID":null,"large":false,"loggedIn":false,"newDiscussionPath":"/Boyle-Lab/Blacklist/discussions/new","newIssuePath":"/Boyle-Lab/Blacklist/issues/new","planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/Boyle-Lab/Blacklist/blob/master/lists/dm6-blacklist.v2.bed.gz","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","dismissStackNoticePath":"/settings/dismiss-notice/publish_stack_from_file","releasePath":"/Boyle-Lab/Blacklist/releases/new?marketplace=true","showPublishActionBanner":false,"showPublishStackBanner":false},"rawBlobUrl":"https://github.com/Boyle-Lab/Blacklist/raw/master/lists/dm6-blacklist.v2.bed.gz","renderImageOrRaw":true,"richText":null,"renderedFileInfo":null,"shortPath":null,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"repoOwner":"Boyle-Lab","repoName":"Blacklist","showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","showDependabotConfigurationBanner":false,"actionsOnboardingTip":null},"truncated":false,"viewable":false,"workflowRedirectUrl":null,"symbols":null},"copilotInfo":null,"copilotAccessAllowed":false,"csrf_tokens":{"/Boyle-Lab/Blacklist/branches":{"post":"ZcN6N4ZgrjyxA5br-NkR86khDrTTqy17ocrQDXYFyy3Qp7XZ9OCm0R-j_KSNx43AU_COFg4W2lzsJtvET7Fv-Q"},"/repos/preferences":{"post":"-yxwDrJRSNi6w6m2qdNL27qzyeSOMkjal2e9VTdy69BJ66VuCisg_cYqTJh57IJS4zwWgnd4cWnRfMYZP0Ddiw"}}},"title":"Blacklist/lists/dm6-blacklist.v2.bed.gz at master ยท Boyle-Lab/Blacklist"} \ No newline at end of file diff --git a/assets/hg38-blacklist.v2.bed.gz b/assets/hg38-blacklist.v2.bed.gz new file mode 100755 index 0000000..a4ec858 Binary files /dev/null and b/assets/hg38-blacklist.v2.bed.gz differ diff --git a/assets/mm10-blacklist.v2.Liftover.mm39.bed.gz b/assets/mm10-blacklist.v2.Liftover.mm39.bed.gz new file mode 100755 index 0000000..3face32 Binary files /dev/null and b/assets/mm10-blacklist.v2.Liftover.mm39.bed.gz differ diff --git a/bin/calculate_min_spikein.py b/bin/calculate_min_spikein.py old mode 100644 new mode 100755 diff --git a/bin/check_samplesheet.py b/bin/check_samplesheet.py old mode 100644 new mode 100755 diff --git a/example/example_input.csv b/example/example_input.csv new file mode 100644 index 0000000..c57ec76 --- /dev/null +++ b/example/example_input.csv @@ -0,0 +1,5 @@ +sample,fastq_1,fastq_2,antibody,control +MYOD_1,./example/read5.fq.gz,./example/read6.fq.gz,MYOD,Input_1 +MYOD_2,./example/read7.fq.gz,./example/read8.fq.gz,MYOD,Input_2 +Input_1,./example/read1.fq.gz,./example/read2.fq.gz,, +Input_2,./example/read3.fq.gz,./example/read4.fq.gz,, \ No newline at end of file diff --git a/example/read1.fq.gz b/example/read1.fq.gz new file mode 100644 index 0000000..a250284 Binary files /dev/null and b/example/read1.fq.gz differ diff --git a/example/read2.fq.gz b/example/read2.fq.gz new file mode 100644 index 0000000..41e3c60 Binary files /dev/null and b/example/read2.fq.gz differ diff --git a/example/read3.fq.gz b/example/read3.fq.gz new file mode 100644 index 0000000..ce08ade Binary files /dev/null and b/example/read3.fq.gz differ diff --git a/example/read4.fq.gz b/example/read4.fq.gz new file mode 100644 index 0000000..50666e0 Binary files /dev/null and b/example/read4.fq.gz differ diff --git a/example/read5.fq.gz b/example/read5.fq.gz new file mode 100644 index 0000000..068038b Binary files /dev/null and b/example/read5.fq.gz differ diff --git a/example/read6.fq.gz b/example/read6.fq.gz new file mode 100644 index 0000000..0e7b54f Binary files /dev/null and b/example/read6.fq.gz differ diff --git a/example/read7.fq.gz b/example/read7.fq.gz new file mode 100644 index 0000000..0897579 Binary files /dev/null and b/example/read7.fq.gz differ diff --git a/example/read8.fq.gz b/example/read8.fq.gz new file mode 100644 index 0000000..d2ce94b Binary files /dev/null and b/example/read8.fq.gz differ diff --git a/modules/nf-core/modules/custom/getchromsizes/main.nf b/modules/nf-core/modules/custom/getchromsizes/main.nf deleted file mode 100644 index bbcfa9b..0000000 --- a/modules/nf-core/modules/custom/getchromsizes/main.nf +++ /dev/null @@ -1,32 +0,0 @@ -process CUSTOM_GETCHROMSIZES { - tag "$fasta" - label 'process_low' - - conda (params.enable_conda ? "bioconda::samtools=1.15" : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15--h1170115_1' : - 'quay.io/biocontainers/samtools:1.15--h1170115_1' }" - - input: - path fasta - - output: - path '*.sizes' , emit: sizes - path '*.fai' , emit: fai - path "versions.yml", emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - """ - samtools faidx $fasta - cut -f 1,2 ${fasta}.fai > ${fasta}.sizes - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - custom: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/nextflow.config b/nextflow.config index 0b85a97..b38c3ca 100644 --- a/nextflow.config +++ b/nextflow.config @@ -27,8 +27,8 @@ params { max_time = 120.h // input/output default params - input = '/home/gdstantonlab/lab/Lex/pipeline/test_input_reps.csv' - outdir = './PerCell_Output/' + input = 'example/example_input.csv' + outdir = 'PerCell_Output' aligner = 'bowtie2' experimental = 'human' spikein = 'mouse' @@ -41,10 +41,10 @@ params { mouse_fa = '' zebrafish_fa = '' fly_fa = '' - human_blacklist = './bin/hg38-blacklist.v2.bed.gz' - mouse_blacklist = './bin/mm10-blacklist.v2.Liftover.mm39.bed.gz' - zebrafish_blacklist = './bin/blank_blacklist.bed.gz' - fly_blacklist = './bin//dm6-blacklist.v2.bed.gz' + human_blacklist = "$projectDir/assets/hg38-blacklist.v2.bed.gz" + mouse_blacklist = "$projectDir/assets/mm10-blacklist.v2.Liftover.mm39.bed.gz" + zebrafish_blacklist = "$projectDir/assets/blank_blacklist.bed.gz" + fly_blacklist = "$projectDir/assets/dm6-blacklist.v2.bed.gz" // params for trimgalore clip_r1 = 0 @@ -96,7 +96,6 @@ params { skip_idr = true idr_cutoff = 0.05 skip_consensus = true - } // Load modules.config for DSL2 module specific options