-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pre-qc V1 Refactor #11
Merged
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ff9cdaf
add gitignore
amadeovezz 3b7a152
update gitignore
amadeovezz 7b94cba
update readme, add new json format for pre_qc
amadeovezz 82781f9
WIP: refactor params parsing and re-work GZIP,CELLRANGER logic
amadeovezz 6477299
update readme.md
amadeovezz 63556c9
continue refactoring barcodes, filter_bam, dsc_pileup
amadeovezz 7a173c4
refactor merging multiple libraries, freemuxlet, and seperate out hel…
amadeovezz ba89801
wip
amadeovezz d987f3c
wip
amadeovezz 3950a18
wip, add doublet and seurat steps
amadeovezz 125846c
fix tricky collect() bug, replace with map() to properly append multi…
amadeovezz 0d2e81b
update for R container v4
amadeovezz 1ab07bd
fix channel input for DEMUXLET_LIBRARY
amadeovezz e779053
add regression tests and snapshots for basic qc-quantiles
amadeovezz dd17a0d
fix bug - run freemuxlet or demuxlet on all libraries in pool when we…
amadeovezz 5a98e29
add testing instructions
amadeovezz 99acfe2
add publish directory for testing and duplicate SEPARATE_FMX process …
amadeovezz 8cc56c9
fix small reference bug
amadeovezz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Nextflow specific | ||
*.uuid | ||
**/.nextflow/ | ||
|
||
# Jetbrains | ||
.idea/ |
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,49 @@ | ||
{ "project_dir" : "/krummellab/data1/amazzara/tutorial_lib_sep", | ||
"settings" : { | ||
"add_tcr" : false, | ||
"add_bcr" : false, | ||
"skip_cellranger": false, | ||
"merge_for_demux" : true, | ||
"merge_demux_dir" : "/krummellab/data1/amazzara/tutorial_lib_sep/freemuxlet_data/", | ||
"demux_method" : "freemuxlet", | ||
"run_doubletfinder" : true, | ||
"mincell" : 3, | ||
"minfeature" : 100, | ||
"default_qc_cuts_dir": "/krummellab/data1/amazzara/sc_seq_pipeline/sc_seq_nextflow/example/", | ||
"default_qc_cuts_file": "default_qc_cuts.csv", | ||
"randomseed" : 21212, | ||
"remove_demux_DBL": true, | ||
"remove_all_DBL": true | ||
}, | ||
"pools" : [ | ||
{ | ||
"name": "DM1", | ||
"nsamples" : "2", | ||
"vcf": "", | ||
"libraries": [ | ||
{ | ||
"dir": "TEST-POOL-DM1-SCG1", | ||
"ncells_loaded": 200, | ||
"data_types": ["GEX"] | ||
}, | ||
{ | ||
"dir": "TEST-POOL-DM1-SCG2", | ||
"ncells_loaded": 200, | ||
"data_types": ["GEX"] | ||
} | ||
] | ||
}, | ||
{ | ||
"nsamples": "2", | ||
"vcf": "", | ||
"name": "DM2", | ||
"libraries": [ | ||
{ | ||
"dir": "TEST-POOL-DM2-SCG1", | ||
"ncells_loaded": 100, | ||
"data_types": ["GEX"] | ||
} | ||
] | ||
} | ||
] | ||
} |
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,96 @@ | ||
def get_c4_h5(library){ | ||
return file("${params.project_dir}/data/single_cell_GEX/processed/${library}/cellranger/raw_feature_bc_matrix.h5", checkIfExists: true) | ||
} | ||
def get_c4_bam(library){ | ||
return file("${params.project_dir}/data/single_cell_GEX/processed/${library}/cellranger/possorted_genome_bam.bam", checkIfExists: true) | ||
} | ||
|
||
def get_c4_h5_bam(){ | ||
return params.pools.collectMany { | ||
pool -> pool.libraries.collect { | ||
library -> [library.dir, get_c4_bam(library.dir), get_c4_h5(library.dir)] | ||
} | ||
} | ||
} | ||
|
||
def get_pool_library_meta(){ | ||
return params.pools.collectMany { | ||
pool -> | ||
return [ | ||
[ | ||
name: pool.name, | ||
vcf: pool.vcf, | ||
nsamples: pool.nsamples, | ||
num_of_libraries: pool.libraries.size(), | ||
lib_directories: pool.libraries*.dir | ||
] | ||
] | ||
} | ||
} | ||
|
||
def get_libraries_data_type(){ | ||
return params.pools.collectMany { | ||
pool -> pool.libraries.collect { | ||
library -> [library.dir, library.data_types.join(",")] | ||
} | ||
} | ||
} | ||
|
||
def get_library_ncells(){ | ||
return params.pools.collectMany { | ||
pool -> pool.libraries.collect { | ||
library -> [library.dir, library.ncells_loaded] | ||
} | ||
} | ||
} | ||
|
||
def get_multi_library_by_pool() { | ||
return get_pool_library_meta().findAll {it.num_of_libraries > 1}.collectMany { pool -> | ||
pool.lib_directories.collect { dir -> | ||
[dir, pool.name] | ||
} | ||
} | ||
} | ||
|
||
def get_single_library_by_pool() { | ||
return get_pool_library_meta().findAll {it.num_of_libraries == 1}.collectMany { pool -> | ||
pool.lib_directories.collect { dir -> | ||
[dir, pool.name] | ||
} | ||
} | ||
} | ||
|
||
def get_library_by_pool() { | ||
return get_pool_library_meta().collectMany { pool -> | ||
pool.lib_directories.collect { dir -> | ||
[dir, pool.name] | ||
} | ||
} | ||
} | ||
|
||
|
||
def get_library_by_sample_count() { | ||
return get_pool_library_meta().collectMany { pool -> | ||
pool.lib_directories.collect { dir -> | ||
[dir, pool.nsamples] | ||
} | ||
} | ||
} | ||
|
||
def get_pool_by_sample_count() { | ||
return get_pool_library_meta().collectMany { pool -> | ||
[ | ||
[pool.name, pool.nsamples] | ||
] | ||
} | ||
} | ||
|
||
def get_pool_vcf() { | ||
return get_pool_library_meta().collectMany { pool -> | ||
[ | ||
[pool.name, pool.vcf] | ||
] | ||
} | ||
|
||
} | ||
|
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,4 @@ | ||
def extractFileName(String path) { | ||
def filename = path.split('/').last() // Split by '/' and get the last part which is the filename | ||
return filename.split("\\.")[0] // Split the filename on dot and return the first part | ||
} |
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,6 @@ | ||
config { | ||
testsDir "tests" | ||
workDir ".nf-test" | ||
configFile "nextflow.config" | ||
profile "test" | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this visual diff is strangely represented here. But all I've done is added a copied the original
SEPARATE_FMX
and added a specific version for the pre-qc pipeline. I didn't want to modify the originalSEPARATE_FMX
since it is used by other pipelines and haven't tested it yet.