Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.

Develop_atac #362

Merged
merged 138 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
1f36a7a
Update qc stats compute from pycisTopic
cflerin Feb 11, 2021
88b4531
Add qc stats plotting
cflerin Feb 11, 2021
d531a93
Add quiet mode
cflerin Feb 11, 2021
30fe266
Change compute resources for qc processes
cflerin Feb 12, 2021
c449d75
QC filtering updates:
cflerin Feb 19, 2021
b0f0952
Add barcode level statistics py script
cflerin Feb 19, 2021
32e3c10
Add bwa-mem2 to bwamaptools image
cflerin Feb 25, 2021
e28202a
Update bwa steps to use bwa-mem2 (optional)
cflerin Feb 25, 2021
22339b7
Integrate singlecelltoolkit updates
cflerin Feb 25, 2021
c181ad6
Simplify bwa mapping subworkflow
cflerin Feb 26, 2021
f80ace6
Update barcode_10x_scatac_fastqs
cflerin Feb 26, 2021
8f86cba
Simplify naming in bwa subworkflow
cflerin Feb 26, 2021
9311538
Add barcode_level_statistics to pycistopic qc
cflerin Feb 28, 2021
c070579
Add biorad processing step from singlecelltoolkit
cflerin Mar 5, 2021
d1498bb
Move biorad block after standard bc correction
cflerin Mar 5, 2021
6434853
Do not publish trimmed fastqs
cflerin Mar 5, 2021
fd58b8b
Cleanup and simplification of process names and imports
cflerin Mar 5, 2021
94c40fa
Update bap docker image to include levenshtein pkg
cflerin Mar 5, 2021
8b38853
Update singlecelltoolkit Docker image
cflerin Mar 5, 2021
3c3e2e6
Revert Sinto image to the standard release
cflerin Mar 5, 2021
2c670af
Remove bap barcode entry from the config
cflerin Mar 5, 2021
adab0d3
Fix default barcode tags in config
cflerin Mar 5, 2021
dcbbfe9
Add call_cells to pycistopic qc
cflerin Mar 11, 2021
e2d7036
Remove cpus param from samtools fixmate
cflerin Mar 15, 2021
b50fc36
Update picard config
cflerin Mar 22, 2021
6ff7ddd
Add MarkDuplicates to Picard
cflerin Mar 22, 2021
c748922
Add GATK tool
cflerin Mar 22, 2021
c0f543f
Add GATK directory fragmework
cflerin Mar 22, 2021
61f314d
Update ATAC preprocessing workflow (mapping)
cflerin Mar 22, 2021
74e1579
Cleanup main Sinto workflow
cflerin Mar 22, 2021
2fab55c
Cleanup bap workflow
cflerin Mar 22, 2021
043e9e7
Avoid hard link in publish process
cflerin Feb 21, 2021
5e104cc
Don't output metrics alongside MarkDuplicatesSpark
cflerin Apr 1, 2021
70a695c
Picate updates: MarkDuplicates
cflerin Apr 1, 2021
02de865
Rename MarkDuplicatesSpark
cflerin Apr 1, 2021
ba0ecfc
Add fastp adapter trimming
cflerin Apr 1, 2021
b09e916
BWA mapping updates
cflerin Apr 1, 2021
ae9305a
ATAC preprocess updates
cflerin Apr 1, 2021
1282878
Update single_cell_toolkit Docker image
cflerin Apr 1, 2021
d90db03
Set default OMP_NUM_THREADS in single_cell_toolkit Docker image
cflerin Apr 2, 2021
b3d878f
Merge branch 'develop' into atac_preprocess_bwamem2
cflerin Apr 2, 2021
e2a1f03
Add a SIMPLE_PUBLISH process in utils
cflerin Apr 30, 2021
44c0ef7
Update atac_preprocess to use simple publish
cflerin Apr 30, 2021
21da3bc
BAP: update image and parameters
cflerin Apr 30, 2021
9a653b3
BAP: add report ipynb and processes to run it
cflerin Apr 30, 2021
f062491
BAP: update Dockerfile
cflerin Apr 30, 2021
13f5a14
BAP: remove sinto from config
cflerin May 2, 2021
3bbcd06
Remove add_barcode_as_tag and config entries
cflerin May 21, 2021
bb785a6
Fix picard parameter scoping
cflerin May 21, 2021
4efc576
Use copy as default publish method
cflerin May 21, 2021
319fea4
Change markdups default to Picard MarkDuplicates
cflerin May 21, 2021
e436311
Fix picard MarkDuplicates
cflerin May 25, 2021
2aebdf3
Process multiple fastqs per sample
cflerin May 25, 2021
f3cb25f
Add capability to run multiple fastqs per sample
cflerin May 25, 2021
2a0f0dd
Update report structure in out directory
cflerin May 25, 2021
cd31960
Update documentation for scATAC-seq preprocessing
cflerin May 26, 2021
2c4c47d
Move picard processes to use GATK image
cflerin May 26, 2021
8b7c04f
Fix gatk config scoping
cflerin May 27, 2021
04f0389
qc workflow updates for combined samples in a single process
cflerin May 27, 2021
5d4c4f6
Update Dockerfile to use samtools zlibng image
cflerin May 27, 2021
57e795a
Merge branch 'develop' into atac_preprocess_bwamem2
cflerin May 27, 2021
8fdcefd
Update default container
cflerin May 27, 2021
a6cbf42
Add fastp settings to the preprocess config
cflerin Jun 4, 2021
37c9ea3
Update bwamaptools docker image setting
cflerin Jun 4, 2021
b69c51a
Cleanup bash code of mapping_summary.sh script.
ghuls Jun 7, 2021
67600f6
Use 2 threads for samtools view when calculating statistics in mappin…
ghuls Jun 7, 2021
2528381
Filter out Calculate number of "Uniquely mapped reads" directly with …
ghuls Jun 7, 2021
0f83400
Fix fastp parameter scope
cflerin Jun 7, 2021
26a52ab
Uncompress BAM file only once when calculating all mapping statistics.
ghuls Jun 7, 2021
3c61a22
Merge branch 'atac_preprocess_bwamem2' of github.com:vib-singlecell-n…
cflerin Jun 8, 2021
3e02f5c
Remove when condition from fastp process
cflerin Jun 8, 2021
8376131
Update sinto container
cflerin Jun 8, 2021
13724c2
Fix bwamaptools container link
cflerin Jun 8, 2021
9b6ae12
Update singlecelltoolkit:
cflerin Jun 9, 2021
b3a6e74
Add hydrop mode for atac_preprocess
cflerin Jun 9, 2021
9f4919d
Rename extract_hydrop_atac_barcode in/out
cflerin Jun 9, 2021
ddacfcf
Refactor singlecelltoolkit barcode correction:
cflerin Jun 9, 2021
9248a23
Refactor atac_preprocess:
cflerin Jun 9, 2021
f0fb1da
Merge branch 'develop' into feature/248-atac_qc
cflerin Jun 14, 2021
74fcdd3
Update pyscisTopic config
cflerin Jun 14, 2021
8d9632d
Merge branch 'atac_preprocess_bwamem2' into feature/248-atac_qc
cflerin Jun 14, 2021
dd7d8a6
Update pycistopic config
cflerin Jun 16, 2021
99fe0a6
pycistopic compute_qc_stats update:
cflerin Jun 16, 2021
cbb9e0d
pycistopic: rename processes
cflerin Jun 16, 2021
88b1e82
pycistopic compute_qc_stats:
cflerin Jun 16, 2021
62bac4c
pycistopic call_cells:
cflerin Jun 16, 2021
c95be5c
QC Filtering workflow updates
cflerin Jun 16, 2021
549b221
Update params for pycistopic call_calls report
cflerin Jun 17, 2021
701538b
Add pycistopic call_cells notebook
cflerin Jun 17, 2021
3c4cb27
pycistopic / qc_filtering config updates
cflerin Jun 17, 2021
83dca98
Update biomart annotation script
cflerin Jun 17, 2021
471a40a
Add host parameter to biomart process
cflerin Jun 17, 2021
468f340
pycistopic QC notebook cleanup
cflerin Jun 17, 2021
f5315cf
Add additional qc parameters to compute_qc_stats
cflerin Jun 17, 2021
8ab5652
More consistent naming in atac_preprocess steps
cflerin Jun 17, 2021
e3b2141
Update bwamaptools Docker image and config
cflerin Jun 17, 2021
4203854
Updates for singlescelltoolkit
cflerin Jun 17, 2021
b9b9d61
Fix incorrect parameter passed to min_norm in compute_qc_stats
cflerin Jun 18, 2021
d29a3ba
Fix argparse parameter type in compute_qc_stats.py
cflerin Jun 18, 2021
952c06b
Revise publishing steps for atac QC
cflerin Jun 18, 2021
cc691fa
Use project name in output file naming
cflerin Jun 18, 2021
136636f
Update atac_qc notebook
cflerin Jun 18, 2021
a3ccfe1
Fix ipynb report naming
cflerin Jun 18, 2021
1ef921a
Add saturation script to atac QC workflow
cflerin Jun 18, 2021
4763473
Update sctk docker image
cflerin Jun 18, 2021
8599162
Rename bap inputs to correctly identify bam index
cflerin Jun 20, 2021
c292f7d
Update regex to select chromosomes for fragments file
cflerin Jun 21, 2021
d5bc8c4
ATAC_QC: Take cellranger path as input
cflerin Jun 21, 2021
2402cd4
Long queue for saturation script
cflerin Jun 21, 2021
d0a2a06
Merge branch 'develop' into feature/248-atac_qc
cflerin Jun 21, 2021
2c00383
Properly stage input files for compute_qc_stats
cflerin Jun 24, 2021
e7b5310
Add try/except to catch /tmp/ray errors and give suggestions how to
cflerin Jun 24, 2021
9d327ad
Update sctk to include new saturation script
cflerin Jun 28, 2021
d7cebfe
Merge branch 'atac_preprocess_bwamem2' into develop_atac
cflerin Jun 29, 2021
9addf0c
Merge branch 'feature/248-atac_qc' into develop_atac
cflerin Jun 29, 2021
903e173
Documentation updates [scATAC-seq]
cflerin Jun 29, 2021
2bc0d9f
Add hydrop entry to sctk whitelist params
cflerin Jun 30, 2021
c03ad16
Merge branch 'develop' into develop_atac
cflerin Jul 1, 2021
6d9afb6
Update singlecelltoolkit
cflerin Jul 1, 2021
cf1c681
Merge branch 'develop' into develop_atac
cflerin Jul 6, 2021
f6d9d42
Update sctk Docker image
cflerin Jul 12, 2021
dd0542d
Use long queue for macs2 peak calling
cflerin Jul 12, 2021
30c2748
Add ability to chain atac_preprocess and QC steps
cflerin Jul 13, 2021
26bb1c4
Add cpu limitations to some processes
cflerin Jul 13, 2021
68740da
Update scATAC documentation
cflerin Jul 20, 2021
3725f53
Update scATAC docs:
cflerin Jul 20, 2021
71ca904
Add barcode correction check to sctk:
cflerin Jul 27, 2021
bb5c090
Saturation script: Change default values, update image
cflerin Jul 27, 2021
22264d4
Saturation script updates
cflerin Jul 28, 2021
f87074c
Use both hydrop ATAC designs in ATAC preprocessing
cflerin Jul 29, 2021
b9f26df
Fixes for new hydrop design
cflerin Jul 29, 2021
ae13381
Update singlecelltoolkit
cflerin Aug 16, 2021
b68e899
Fix to avoid input filename collisions in ATAC QC workflow
cflerin Aug 20, 2021
f2a214e
Fix for bap workflow
cflerin Sep 27, 2021
5e53841
Update docs for new HyDrop methods
cflerin Sep 27, 2021
317f1e3
Merge branch 'feature/352-hydrop-design' into develop_atac
cflerin Sep 27, 2021
968b8ea
Fix for bap ipynb path
cflerin Sep 27, 2021
00322ce
Added Docker build descriptions to module readme files
cflerin Sep 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion conf/atac/preprocess.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
params {
atac_preprocess_tools {
mark_duplicates_method = 'MarkDuplicates'
adapter_trimming_method = 'Trim_Galore'
}
data {
atac_preprocess {
metadata = 'metadata.tsv'
Expand All @@ -7,10 +11,13 @@ params {
}

includeConfig './../../src/singlecelltoolkit/singlecelltoolkit.config'
includeConfig './../../src/singlecelltoolkit/conf/sctk_mapping.config'
includeConfig './../../src/trimgalore/trimgalore.config'
includeConfig './../../src/fastp/fastp.config'
includeConfig './../../src/bwamaptools/bwamaptools.config'
includeConfig './../../src/gatk/gatk.config'
includeConfig './../../src/bwamaptools/conf/bwa_mapping.config'
includeConfig './../../src/sinto/sinto.config'
includeConfig './../../src/bap/bap.config'
includeConfig './../../src/bap/conf/bap_biorad_debarcode.config'
//includeConfig './../../src/bap/conf/bap_biorad_debarcode.config'

3 changes: 2 additions & 1 deletion conf/atac/qc_filtering.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
includeConfig './../../src/archr/archr.config'
includeConfig './../../src/pycistopic/pycistopic.config'
includeConfig './../../src/singlecelltoolkit/singlecelltoolkit.config'
includeConfig './../../src/singlecelltoolkit/conf/sctk_saturation.config'

1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
:caption: scATAC-seq

scatac-seq
scatac-seq_qc

.. toctree::
:maxdepth: 2
Expand Down
413 changes: 347 additions & 66 deletions docs/scatac-seq.rst

Large diffs are not rendered by default.

212 changes: 212 additions & 0 deletions docs/scatac-seq_qc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
scATAC-seq QC and Cell Calling
==============================

This workflow uses the Python implementation of `cisTopic <https://github.com/aertslab/cisTopic>`_ (pycisTopic) to perform quality control and cell calling.
The inputs here are a fragments and bam file for each sample.

This workflow is currently available in the ``develop_atac`` branch (use ``nextflow pull vib-singlecell-nf/vsn-pipelines -r develop_atac`` to sync this branch).

----


Running the workflow
********************

Technical considerations
------------------------

1. Direct the Nextflow work directory to an alternate path (e.g. a scratch drive) using the ``NXF_WORK`` environmental variable::

nwork=/path/to/scratch/example_project
mkdir $nwork
export NXF_WORK=$nwork

Note that if you start a new shell, ``NXF_WORK`` must be set again, or the pipeline will not resume properly.


2. Important for pycisTopic Ray issues: the system default temp location may become full.
A workaround is to include a volume mapping to the alternate ``/tmp`` ``-B /alternate/path/to/tmp:/tmp`` using the volume mount options in Docker or Singularity.
For example in the container engine options:
- Singularity run options: ``runOptions = '--cleanenv -H $PWD -B /data,/alternate/path/to/tmp:/tmp'``
- Docker run options: ``runOptions = '-i -v /data:/data -v /alternate/path/to/tmp:/tmp'``


3. Use the ``--quiet`` flag with ``nextflow run`` to suppress the printing of each file that is detected by the pipeline.

----

Configuration
-------------

For each sample, this pipeline take a bam and a fragments file.
These can be specified separately, or from a Cell Ranger ATAC/ARC ``outs/`` path.

Input with independent bam and fragments files
______________________________________________

Use the profiles ``bam`` and ``fragments``::

nextflow config vib-singlecell-nf/vsn-pipelines/main_atac.nf \
-profile atac_qc_filtering,bam,fragments,vsc,pycistopic_hg38 \
> atac_qc.config

Preset profiles are available for human (``pycistopic_hg38``), mouse (``pycistopic_mm10``), and fly (``pycistopic_dmel``).
Or, these profiles can be omitted and set manually in the config (biomart, macs2).


Input data (bam and fragments files) are specified in the data section::

data {
fragments {
file_paths = '/staging/leuven/stg_00002/lcb/cflerin/analysis/asap/20210527_hydrop-atac_asabr/atac_preprocess/out_run1/data/fragments/ASA__*tsv.gz'
suffix = '.sinto.fragments.tsv.gz'
index_extension = '.tbi'
}
bam {
file_paths = '/staging/leuven/stg_00002/lcb/cflerin/analysis/asap/20210527_hydrop-atac_asabr/atac_preprocess/out_run1/data/bam/ASA*bam'
suffix = '.bwa.out.possorted.bam'
index_extension = '.bai'
}
}


Multiple files can be specified with ``*`` in ``file_paths`` or by separating the paths with a comma.

.. warning::

The ``suffix`` for both bam and fragments will be removed from the filename to get sample IDs.
The sample names obtained must match between bam and fragments for the files to be paired properly in the workflow.


Input with Cell Ranger ATAC data
________________________________

Use the ``tenx_atac`` profile::

nextflow config vib-singlecell-nf/vsn-pipelines/main_atac.nf \
-profile atac_qc_filtering,tenx_atac,vsc,pycistopic_hg38 \
> atac_qc.config

Input data (the Cell Ranger ``outs/`` path) are specified in the data section::

data {
tenx_atac {
cellranger_mex = '/data/cellranger_atac_2.0/*/outs,/data/processed/cellranger_arc_2.0.0/*/outs'
}
}

Multiple files can be specified with ``*`` in ``tenx_atac`` or by separating the paths with a comma.


Input directly from the preprocessing pipeline
______________________________________________

It is also possible to run these QC steps directly after the ``atac_preprocess`` pipeline, with a single command.
In this case, all the appropriate configuration profiles must be included at the configuration start::

nextflow config vib-singlecell-nf/vsn-pipelines/main_atac.nf \
-profile atac_preprocess,atac_qc_filtering,pycistopic_hg38,vsc \
> atac_preprocess_and_qc.config

Note that here, we do not include ``bam`` and ``fragments`` profiles that specify the input data locations to the QC steps since these are piped directly from the preprocessing pipeline.
One caveat to this is that it could potentially make it harder to run the qc pipeline with ``-resume`` later on, especially if the Nextflow ``work/`` directory is not saved due to disk space concerns.

To execute the preprocessing and mapping pipeline in one step, use the ``atac_preprocess_with_qc`` entry point::

nextflow -C atac_preprocess_and_qc.config run \
vib-singlecell-nf/vsn-pipelines/main_atac.nf \
-entry atac_preprocess_with_qc -resume --quiet


----

Execution
---------

After configuring, the workflow can be run with:

.. code:: bash

nextflow -C atac_qc.config run \
vib-singlecell-nf/vsn-pipelines/main_atac.nf \
-entry atac_qc_filtering --quiet -resume

After completing, view the report in ``out/notebooks/<project_name>__pycisTopic_QC_report.html``. To change the filtering settings, use the ``params.tools.pycistopic.call_cells`` section.

Adjusting the filter settings
-----------------------------

In the pycisTopic parameters, filter settings can be applied in this section::

pycistopic {
call_cells {
report_ipynb = '/src/pycistopic/bin/pycisTopic_qc_report_template.ipynb'
use_density_coloring_on_scatterplot = true
use_detailed_title_on_scatterplot = true
filter_frags_lower = '1000'
filter_frags_upper = ''
filter_tss_lower = '8'
filter_tss_upper = ''
filter_frip_lower = ''
filter_frip_upper = ''
filter_dup_rate_lower = ''
filter_dup_rate_upper = ''
}
}

If a setting is empty (``''``), this filter will not be applied.
If set to a single value (i.e. ``filter_frags_lower=1000``), this will apply this filter value to all samples.
To use sample-specific filters, this can be written as::

filter_frags_lower = [
'default': 1000,
'Sample_1': 1500,
'Sample_2': 2000,
]

The ``default`` setting (optional) is applied to all samples not listed in array.
If this default setting is missing, no filter will be applied to samples not listed in the array (all barcodes kept).

After setting the filters, the pipeline can be re-run to apply the new filters (use ``-resume``).

The additional settings control the output of the scatter plots in the report:
* ``use_density_coloring_on_scatterplot``: Slower when turned on; it can be helpful to set this to ``false`` until the proper thresholds are determined.
* ``use_detailed_title_on_scatterplot``: Adds the cell count and median values after filtering to the title of each plot.

----

Output
******

An example output tree is shown here.

.. code:: bash

out/
├── data
│   ├── macs2
│   │   ├── sample_1.peaks.narrowPeak
│   │   ├── sample_1.summits.bed
│   │   ├── sample_2.peaks.narrowPeak
│   │   └── sample_2.summits.bed
│   └── pycistopic
│   └── qc
│   ├── benchmark_library_downsampled__metadata.pickle
│   ├── benchmark_library_downsampled__profile_data.pickle
│   ├── selected_barcodes
│   │   ├── sample_1.cell_barcodes.txt
│   │   └── sample_2.cell_barcodes.txt
│   └── selected_barcodes_nFrag
│   ├── sample_1.barcodes_nFrag_thr.txt
│   └── sample_2.barcodes_nFrag_thr.txt
└── notebooks
├── example_project__pycisTopic_QC_report.html
└── example_project__pycisTopic_QC_report.ipynb


* ``macs2``: contains the narrowPeak and bed file for each sample.
* ``pycistopic``:
* ``qc``: contains Python objects (in pickle format) for the metadata and profile data computed by pycisTopic.
* ``selected_barcodes``: contains a text file with selected cell barcodes (one per line) based on the thresholds set in the config file.
* ``selected_barcodes_nFrag``: contains a text file with barcodes (one per line) that have unique fragment counts greater than the ``params.tools.pycistopic.compute_qc_stats.n_frag`` setting in the pycisTopic parameters.

42 changes: 23 additions & 19 deletions main_atac.nf
Original file line number Diff line number Diff line change
Expand Up @@ -37,53 +37,42 @@ workflow cellranger_atac {
}


workflow cistopic {

include {
cistopic as CISTOPIC
} from './src/cistopic/main' params(params)

getDataChannel | CISTOPIC

}


workflow atac_preprocess {

// generic ATAC-seq preprocessing pipeline: adapter trimming, mapping, fragments file generation
include {
ATAC_PREPROCESS_WITH_METADATA;
ATAC_PREPROCESS;
} from './workflows/atac/preprocess.nf' params(params)

ATAC_PREPROCESS_WITH_METADATA(file(params.data.atac_preprocess.metadata))
ATAC_PREPROCESS(file(params.data.atac_preprocess.metadata))

}


workflow atac_preprocess_bap {

include {
ATAC_PREPROCESS_WITH_METADATA;
ATAC_PREPROCESS;
} from './workflows/atac/preprocess.nf' params(params)
include {
get_bam;
BAP__BARCODE_MULTIPLET_PIPELINE;
BAP__BARCODE_MULTIPLET_WF;
} from './src/bap/main.nf' params(params)

ATAC_PREPROCESS_WITH_METADATA(file(params.data.atac_preprocess.metadata)) |
ATAC_PREPROCESS(file(params.data.atac_preprocess.metadata)) |
get_bam |
BAP__BARCODE_MULTIPLET_PIPELINE
BAP__BARCODE_MULTIPLET_WF

}


workflow bap {

include {
BAP__BARCODE_MULTIPLET_PIPELINE;
BAP__BARCODE_MULTIPLET_WF;
} from './src/bap/main.nf' params(params)

getDataChannel | BAP__BARCODE_MULTIPLET_PIPELINE
getDataChannel | BAP__BARCODE_MULTIPLET_WF

}

Expand All @@ -101,6 +90,21 @@ workflow atac_qc_filtering {

}

workflow atac_preprocess_with_qc {

// generic ATAC-seq preprocessing pipeline: adapter trimming, mapping, fragments file generation
include {
ATAC_PREPROCESS;
} from './workflows/atac/preprocess.nf' params(params)
include {
ATAC_QC_PREFILTER;
} from './workflows/atac/qc_filtering.nf' params(params)

pp = ATAC_PREPROCESS(file(params.data.atac_preprocess.metadata))
ATAC_QC_PREFILTER(pp.bam.mix(pp.fragments))

}

workflow atac_preprocess_freemuxlet {

// generic ATAC-seq preprocessing pipeline: adapter trimming, mapping, fragments file generation
Expand Down
8 changes: 5 additions & 3 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ profiles {
includeConfig 'conf/nemesh.config'
includeConfig 'src/fastp/fastp.config'
includeConfig 'src/picard/picard.config'
includeConfig 'src/picard/conf/nemesh.config'
includeConfig 'src/dropseqtools/dropseqtools.config'
includeConfig 'src/star/star.config'
includeConfig 'src/dropletutils/dropletutils.config'
Expand Down Expand Up @@ -465,9 +466,6 @@ profiles {
includeConfig 'src/cellranger-atac/conf/count.config'
includeConfig 'src/cellranger-atac/conf/count_metadata.config'
}
cistopic {
includeConfig 'src/cistopic/cistopic.config'
}
atac_preprocess {
includeConfig 'conf/atac/preprocess.config'
}
Expand All @@ -482,6 +480,10 @@ profiles {
includeConfig 'conf/atac/preprocess.config'
includeConfig 'src/popscle/popscle.config'
}
/* pycistopic (biomart/macs2) profiles (load after pycistopic config) */
pycistopic_hg38 { includeConfig 'src/pycistopic/conf/pycistopic_hg38.config' }
pycistopic_mm10 { includeConfig 'src/pycistopic/conf/pycistopic_mm10.config' }
pycistopic_dmel { includeConfig 'src/pycistopic/conf/pycistopic_dmel.config' }


/*
Expand Down
2 changes: 1 addition & 1 deletion src/bap/conf/bap_barcode_multiplet.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ params {
tools {
bap {
barcode_multiplet {
report_ipynb = './src/bap/bin/bap_barcode_multiplet_report.ipynb'
report_ipynb = '/src/bap/bin/bap_barcode_multiplet_report.ipynb'
bead_tag = 'CB' // existing tag in bam file
drop_tag = 'DB' // new tag with merged barcodes
// filters:
Expand Down
7 changes: 3 additions & 4 deletions src/bap/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ nextflow.enable.dsl=2
// Import sub-workflows from the modules:

include {
SC__BAP__BARCODE_MULTIPLET_PIPELINE;
BAP__BARCODE_MULTIPLET_PIPELINE as BARCODE_MULTIPLET_PIPELINE;
} from './processes/barcode_multiplet.nf' params(params)

include {
Expand All @@ -25,15 +25,14 @@ workflow get_bam {
bam
}


workflow BAP__BARCODE_MULTIPLET_PIPELINE {
workflow BAP__BARCODE_MULTIPLET_WF {

take:
bam

main:

bap = SC__BAP__BARCODE_MULTIPLET_PIPELINE(bam.map { it -> tuple(it[0], it[1], it[2]) })
bap = BARCODE_MULTIPLET_PIPELINE(bam.map { it -> tuple(it[0], it[1][0], it[1][1]) })

GENERATE_REPORT(
file(workflow.projectDir + params.tools.bap.barcode_multiplet.report_ipynb),
Expand Down
Loading