forked from nf-core/crisprseq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nf-core#99 from LaurenceKuhl/crisprcleanr
Change the workflow to take MAGeCK MLE and BAGEL2 as a default and add tests
- Loading branch information
Showing
10 changed files
with
150 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Nextflow config file for running minimal tests | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Defines input files and everything required to run a fast and simple pipeline test. | ||
Use as follows: | ||
nextflow run nf-core/crisprseq -profile test_screening_rra,<conda/docker/singularity> --outdir <OUTDIR> | ||
---------------------------------------------------------------------------------------- | ||
*/ | ||
|
||
params { | ||
config_profile_name = 'Test screening profile' | ||
config_profile_description = 'Minimal test dataset to check pipeline function' | ||
|
||
// Limit resources so that this can run on GitHub Actions | ||
max_cpus = 2 | ||
max_memory = '6.GB' | ||
max_time = '6.h' | ||
|
||
// Input data | ||
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/crisprseq/testdata/samplesheet_test.csv' | ||
analysis = 'screening' | ||
crisprcleanr = "Brunello_Library" | ||
library = "https://raw.githubusercontent.com/nf-core/test-datasets/crisprseq/testdata/brunello_target_sequence.txt" | ||
contrasts = "https://raw.githubusercontent.com/nf-core/test-datasets/crisprseq/testdata/rra_contrasts.txt" | ||
rra = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
process MATRICESCREATION { | ||
label 'process_single' | ||
|
||
conda 'r-ggplot2=3.4.3 bioconductor-shortread=1.58.0 r-ggpubr=0.6.0 r-ggmsa=1.0.2 r-seqmagick=0.1.6 r-tidyr=1.3.0 r-ggseqlogo=0.1 r-cowplot=1.1.1 r-seqinr=4.2_30 r-optparse=1.7.3 r-dplyr=1.1.2 r-plyr=1.8.8 r-stringr=1.5.0 r-plotly=4.10.2' | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/mulled-v2-6de07928379e6eface08a0019c4a1d6b5192e805:0d77388f37ddd923a087f7792e30e83ab54c918c-0' : | ||
'biocontainers/mulled-v2-6de07928379e6eface08a0019c4a1d6b5192e805:0d77388f37ddd923a087f7792e30e83ab54c918c-0' }" | ||
|
||
input: | ||
path(contrasts) | ||
|
||
output: | ||
path("*.txt"), emit: design_matrix | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
|
||
""" | ||
#!/usr/bin/env Rscript | ||
#### author: Laurence Kuhlburger | ||
#### Released under the MIT license. See git repository (https://github.com/nf-core/crisprseq) for full license text. | ||
#### | ||
#### Orient a reference sequence according to reads orientation. | ||
data <- read.table("$contrasts", header = TRUE, sep = ";", stringsAsFactors = FALSE) | ||
# Loop through each row in the data | ||
for (i in 1:nrow(data)) { | ||
# Extract control and treatment samples for the current row | ||
control_samples <- unlist(strsplit(data\$reference[i], ",")) | ||
treatment_samples <- unlist(strsplit(data\$treatment[i], ",")) | ||
# Create a vector of all unique samples | ||
all_samples <- unique(c(control_samples, treatment_samples)) | ||
# Initialize a matrix to store the design matrix | ||
design_matrix <- data.frame(matrix(0, nrow = length(all_samples), ncol = 3, | ||
dimnames = list(all_samples, c("Samples", "baseline", paste0(gsub(',', '_', data\$treatment[i] ),"_vs_", data\$reference[i]))))) | ||
# Set baseline and treatment values in the design matrix | ||
design_matrix[, "Samples"] <- rownames(design_matrix) | ||
design_matrix\$baseline <- 1 | ||
design_matrix[treatment_samples, paste0(gsub(',', '_', data\$treatment[1] ),"_vs_",gsub(",","_",data\$reference[i]))] <- 1 | ||
# Print the design matrix to a file | ||
output_file <- paste0(gsub(',', '_', data\$treatment[1] ),"_vs_",gsub(",","_",data\$reference[i]),".txt") | ||
write.table(design_matrix, output_file, sep = "\t", quote = FALSE, row.names=FALSE) | ||
} | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters