Skip to content

Commit

Permalink
Merge pull request #338 from JoseEspinosa/bump_chromap
Browse files Browse the repository at this point in the history
Bump chromap
  • Loading branch information
JoseEspinosa committed Apr 17, 2023
2 parents ff9eb2a + 261cc86 commit 8f4d262
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 58 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Updated pipeline template to [nf-core/tools 2.7.2](https://github.com/nf-core/tools/releases/tag/2.7.2)
- [[#317](https://github.com/nf-core/chipseq/issues/317)] Added metro map
- [[#288](https://github.com/nf-core/chipseq/issues/291)] Bump `chromap` version 2 and enable all the steps below chromap again when paired-end data is processed.

## [[2.0.0](https://github.com/nf-core/chipseq/releases/tag/2.0.0)] - 2022-10-03

Expand Down
3 changes: 0 additions & 3 deletions bin/bampe_rm_orphan.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@


def makedir(path):

if not len(path) == 0:
try:
os.makedirs(path)
Expand All @@ -63,7 +62,6 @@ def makedir(path):


def bampe_rm_orphan(BAMIn, BAMOut, onlyFRPairs=False):

## SETUP DIRECTORY/FILE STRUCTURE
OutDir = os.path.dirname(BAMOut)
makedir(OutDir)
Expand All @@ -89,7 +87,6 @@ def bampe_rm_orphan(BAMIn, BAMOut, onlyFRPairs=False):
## FILTER FOR READS ON SAME CHROMOSOME IN FR ORIENTATION
if onlyFRPairs:
if pair1.tid == pair2.tid:

## READ1 FORWARD AND READ2 REVERSE STRAND
if not pair1.is_reverse and pair2.is_reverse:
if pair1.reference_start <= pair2.reference_start:
Expand Down
2 changes: 0 additions & 2 deletions bin/check_samplesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def check_samplesheet(file_in, file_out):

sample_mapping_dict = {}
with open(file_in, "r", encoding="utf-8-sig") as fin:

## Check header
MIN_COLS = 2
HEADER = ["sample", "fastq_1", "fastq_2", "antibody", "control"]
Expand Down Expand Up @@ -156,7 +155,6 @@ def check_samplesheet(file_in, file_out):
+ "\n"
)
for sample in sorted(sample_mapping_dict.keys()):

## Check that multiple runs of the same sample are of the same datatype i.e. single-end / paired-end
if not all(x[0] == sample_mapping_dict[sample][0][0] for x in sample_mapping_dict[sample]):
print_error(
Expand Down
2 changes: 0 additions & 2 deletions bin/igv_files_to_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@


def makedir(path):

if not len(path) == 0:
try:
os.makedirs(path)
Expand All @@ -72,7 +71,6 @@ def makedir(path):


def igv_files_to_session(XMLOut, ListFile, ReplaceFile, Genome, PathPrefix=""):

makedir(os.path.dirname(XMLOut))

replaceFileDict = {}
Expand Down
2 changes: 0 additions & 2 deletions bin/macs2_merged_expand.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@


def makedir(path):

if not len(path) == 0:
try:
os.makedirs(path)
Expand All @@ -78,7 +77,6 @@ def makedir(path):


def macs2_merged_expand(MergedIntervalTxtFile, SampleNameList, OutFile, isNarrow=False, minReplicates=1):

makedir(os.path.dirname(OutFile))

combFreqDict = {}
Expand Down
4 changes: 2 additions & 2 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
},
"chromap/chromap": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"git_sha": "d6b7b1f108dab88b0269a4331767c36a1a8da960",
"installed_by": ["modules"]
},
"chromap/index": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"git_sha": "d6b7b1f108dab88b0269a4331767c36a1a8da960",
"installed_by": ["modules"]
},
"custom/dumpsoftwareversions": {
Expand Down
10 changes: 5 additions & 5 deletions modules/nf-core/chromap/chromap/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion modules/nf-core/chromap/chromap/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions modules/nf-core/chromap/index/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion modules/nf-core/chromap/index/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions subworkflows/local/prepare_genome.nf
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ workflow PREPARE_GENOME {
ch_chromap_index = UNTAR_CHROMAP_INDEX ( [ [:], params.chromap_index ] ).untar.map{ it[1] }
ch_versions = ch_versions.mix(UNTAR.out.versions)
} else {
ch_chromap_index = file(params.chromap_index)
ch_chromap_index = [ [:], file(params.chromap_index) ]
}
} else {
ch_chromap_index = CHROMAP_INDEX ( ch_fasta ).index
ch_chromap_index = CHROMAP_INDEX ( [ [:], ch_fasta ] ).index
ch_versions = ch_versions.mix(CHROMAP_INDEX.out.versions)
}
}
Expand Down
36 changes: 4 additions & 32 deletions workflows/chipseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -208,39 +208,11 @@ workflow CHIPSEQ {
FASTQC_TRIMGALORE.out.reads,
PREPARE_GENOME.out.chromap_index,
PREPARE_GENOME.out.fasta
.map {
[ [:], it ]
}
)

// Filter out paired-end reads until the issue below is fixed
// https://github.com/nf-core/chipseq/issues/291
// ch_genome_bam = ALIGN_CHROMAP.out.bam
ALIGN_CHROMAP
.out
.bam
.branch {
meta, bam ->
single_end: meta.single_end
return [ meta, bam ]
paired_end: !meta.single_end
return [ meta, bam ]
}
.set { ch_genome_bam_chromap }

ch_genome_bam_chromap
.paired_end
.collect()
.map {
it ->
def count = it.size()
if (count > 0) {
log.warn "=============================================================================\n" +
" Paired-end files produced by chromap cannot be used by some downstream tools due to the issue below:\n" +
" https://github.com/nf-core/chipseq/issues/291\n" +
" They will be excluded from the analysis. Consider using a different aligner\n" +
"==================================================================================="
}
}

ch_genome_bam = ch_genome_bam_chromap.single_end
ch_genome_bam = ALIGN_CHROMAP.out.bam
ch_genome_bam_index = ALIGN_CHROMAP.out.bai
ch_samtools_stats = ALIGN_CHROMAP.out.stats
ch_samtools_flagstat = ALIGN_CHROMAP.out.flagstat
Expand Down

0 comments on commit 8f4d262

Please sign in to comment.