From 7bf7279757e27544cfc03349ff4fda9b95b3e737 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Tue, 4 Jul 2023 15:17:49 +0100 Subject: [PATCH 01/12] Adding merging script for arbitrary Bismark coverage files --- merge_arbitrary_coverage_files.py | 78 +++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100755 merge_arbitrary_coverage_files.py diff --git a/merge_arbitrary_coverage_files.py b/merge_arbitrary_coverage_files.py new file mode 100755 index 0000000..c879559 --- /dev/null +++ b/merge_arbitrary_coverage_files.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python + +import os +import glob +import time +import gzip +import argparse +import sys + +def merge_coverage_files(basename): + print(f"Merging Bismark coverage files into a file called '{basename}.cov.gz'") + cov_files = glob.glob("*.cov.gz") + + if not cov_files: + print("Error: No files ending in '.cov.gz' found in the current folder.") + sys.exit(1) + + allcov = {} # overarching dictionary + + for file in cov_files: + print(f"Reading methylation calls from file: {file}") + + isGzip = False + if file.endswith("gz"): + infile = gzip.open(file, 'rt') # mode is 'rt' for text mode + isGzip = True + else: + infile = open(file) + + for line in infile: + + if isGzip: + line = line.rstrip() # no need to decode if using 'rt' mode + else: + line = line.rstrip() + + chrom, pos, m, u = [line.split(sep="\t")[i] for i in (0, 1, 4, 5)] # list comprehension + + if chrom in allcov.keys(): + pass + else: + allcov[chrom] = {} + + pos = int(pos) + + if pos in allcov[chrom].keys(): + pass + else: + allcov[chrom][pos] = {} + allcov[chrom][pos]["meth"] = 0 + allcov[chrom][pos]["unmeth"] = 0 + + allcov[chrom][pos]["meth"] += int(m) + allcov[chrom][pos]["unmeth"] += int(u) + + infile.close() + + print("Now printing out a new, merged coverage file") + + with gzip.open(f"{basename}.cov.gz", "wt") as out: + for chrom in sorted(allcov.keys()): + for pos in sorted(allcov[chrom].keys()): + perc = '' + if (allcov[chrom][pos]['meth'] + allcov[chrom][pos]['unmeth'] == 0): + print("Both methylated and unmethylated positions were 0. Exiting...") + sys.exit() + else: + perc = allcov[chrom][pos]['meth'] / (allcov[chrom][pos]['meth'] + allcov[chrom][pos]['unmeth']) * 100 + + out.write(f"{chrom}\t{pos}\t{pos}\t{perc:.2f}\t{allcov[chrom][pos]['meth']}\t{allcov[chrom][pos]['unmeth']}\n") + + print(f"All done! The merged coverage file '{basename}.cov.gz' has been created.\n") + +if __name__ == '__main__': + parser = argparse.ArgumentParser(description='Merge Bismark coverage files into a file called "basename.cov.gz".') + parser.add_argument('-b', '--basename', default='merged_coverage_file', help='The basename for the merged coverage file.') + args = parser.parse_args() + merge_coverage_files(args.basename) From 97f39aaaf129dc570f5bf17a307c8dcb566da147 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Tue, 4 Jul 2023 16:04:10 +0100 Subject: [PATCH 02/12] merge coverage files as command line positional arguments --- merge_coverage_files_ARGV.py | 127 +++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100755 merge_coverage_files_ARGV.py diff --git a/merge_coverage_files_ARGV.py b/merge_coverage_files_ARGV.py new file mode 100755 index 0000000..c19dffc --- /dev/null +++ b/merge_coverage_files_ARGV.py @@ -0,0 +1,127 @@ +#!/usr/bin/env python + +import os +import glob +import time +import gzip +import sys +import argparse + +print ("Merging Bismark coverage files given as command line arguments") +# cov_files = glob.glob("*.cov.gz") + +# if (options.verbose): +# print_options(options) + + + + +def parse_options(): + parser = argparse.ArgumentParser(description="Set base-name to write merged Bismark coverage files to") + parser.add_argument("-b","--basename", type=str, help="Basename of file to write merged coverage output to (default 'merged_coverage_file')", default="merged_coverage_file.cov.gz") + parser.add_argument("filenames", help="The Bismark coverage files to merge", nargs='+') + + options = parser.parse_args() + return options + +def main(): + + options = parse_options() + print (f"Using the following basename: {options.basename}") + cov_files = options.filenames + print (f"Meging the following files: {cov_files}") + allcov = {} # overarching dictionary + + for filename in cov_files: + print (f"Reading methylation calls from file: {filename}") + + isGzip = False + if filename.endswith("gz"): + infile = gzip.open(filename) # mode is 'rb' + isGzip = True + else: + infile = open(filename) + + for line in infile: + + if isGzip: + line = line.decode().rstrip() # need to decode from a Binary to Str object + else: + line = line.rstrip() + + # print(line) + # chrom, pos, m, u = line.split(sep="\t")[0,1,4,5] + + chrom, pos, m, u = [line.split(sep="\t")[i] for i in (0,1,4,5)] # list comprehension + + if chrom in allcov.keys(): + pass + # print (f"already present: {chrom}") + else: + allcov[chrom] = {} + + # print (f"Key not present yet for chromosome: {chrom}. Creating now") + # converting the position to int() right here + pos = int(pos) + + if pos in allcov[chrom].keys(): + # print (f"Positions was already present: chr: {chrom}, pos: {pos}") + pass + else: + allcov[chrom][pos] = {} + allcov[chrom][pos]["meth"] = 0 + allcov[chrom][pos]["unmeth"] = 0 + + allcov[chrom][pos]["meth"] += int(m) + allcov[chrom][pos]["unmeth"] += int(u) + + # print (f"Chrom: {chrom}") + # print (f"Chrom: {chrom}, Pos: {pos}, Meth: {m}, Unmeth: {u}") + # time.sleep(0.1) + + infile.close() + + + + + + # resetting + del chrom + del pos + outfile = f"{options.basename}.merged.cov.gz" + + print (f"Now printing out a new, merged coverage file to >>{outfile}<<") + + with gzip.open(outfile,"wt") as out: + # Just sorting by key will sort lexicographically, which is unintended. + # At least not for the positions + for chrom in sorted(allcov.keys()): + + # Option I: This is a solution using {} dictionary comprehension. Seems to work. + # print (f"Converting position keys to int first for chromosome {chrom}") + # allcov[chrom] = {int(k) : v for k, v in allcov[chrom].items()} + + # Option II: Another option could be to use a Lambda function to make the keys integers on the fly + # print (f"Attempting solution using a Lambda function on the positions for chrom:{chrom}") + # for pos in sorted(allcov[chrom].keys(), key = lambda x: int(x)): + # This also works + + # Option III: Since I changed the values going into the positions dictionary, sorted() + # will now automatically perform a numerical sort. So no further action is required. + print (f"Now sorting positions on chromosome: {chrom}") + for pos in sorted(allcov[chrom].keys()): + perc = '' + if (allcov[chrom][pos]['meth'] + allcov[chrom][pos]['unmeth'] == 0): + # This should not happen in real data, as coverage files by definition only show covered positions + print ("Both methylated and unmethylated positions were 0. Dying now...") + sys.exit() + else: + perc = allcov[chrom][pos]['meth'] / (allcov[chrom][pos]['meth'] + allcov[chrom][pos]['unmeth']) * 100 + + # percentage is displayed with 2 decimals with f-string formatting + out.write(f"{chrom}\t{pos}\t{pos}\t{perc:.2f}\t{allcov[chrom][pos]['meth']}\t{allcov[chrom][pos]['unmeth']}\n") + + print ("All done, enjoy the merged coverage file!\n") + +if __name__ == '__main__': + main() \ No newline at end of file From 0bbc1e1b7f1b0448a9312c41955eacf81e442274 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Mon, 7 Aug 2023 10:51:15 +0200 Subject: [PATCH 03/12] Changed path to Samtools mentioned in #609 --- deduplicate_bismark | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deduplicate_bismark b/deduplicate_bismark index bd682b0..08c4ca7 100755 --- a/deduplicate_bismark +++ b/deduplicate_bismark @@ -154,7 +154,7 @@ foreach my $file (@filenames){ if ($multiple){ # we are assuming that all files are either in BAM format if ($file =~ /\.bam$/){ - open (IN,"$samtools_path cat -h $file @filenames | samtools view -h |") or die "Unable to read from BAM files in '@filenames': $!\n"; + open (IN,"$samtools_path cat -h $file @filenames | $samtools_path view -h |") or die "Unable to read from BAM files in '@filenames': $!\n"; } # or all in SAM format else{ # if the reads are in SAM format we simply concatenate them From 5c6f4b6c39a2d6090caf63549371003934f3bf84 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Mon, 7 Aug 2023 10:54:55 +0200 Subject: [PATCH 04/12] modified Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c9473..7fa2692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Bismark Changelog +### deduplicate_bismark + +- Changed the path to Samtools to custom variable ([#609](https://github.com/FelixKrueger/Bismark/issues/609)) + ## Changelog for Bismark v0.24.1 (release on 29 May 2023) - Added new [documentation website](http://felixkrueger.github.io/Bismark/), built using [Material for Mkdocs](https://squidfunk.github.io/mkdocs-material/). Thanks to @ewels for a great (late-night) effort to break up and restructure what had become a fairly unwieldy monolithic beast From 913b8baa3d85ad148469cb9afc79298b2b69dd10 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Tue, 8 Aug 2023 10:16:56 +0200 Subject: [PATCH 05/12] Changed help text for parallel processing --- bismark | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bismark b/bismark index 8026a15..a6dbeac 100755 --- a/bismark +++ b/bismark @@ -25,7 +25,7 @@ use lib "$RealBin/../lib"; my $parent_dir = getcwd(); -my $bismark_version = 'v0.24.1'; +my $bismark_version = 'v0.24.1dev'; my $copyright_dates = "2010-23"; my $start_run = time(); @@ -7963,9 +7963,9 @@ VERSION ### BOWTIE 2/HISAT2 PARALLELIZATION OPTIONS if ($parallel){ - die "Please select a value for -p of 2 or more (ideally not higher than 4 though...)!\n" unless ($parallel > 1); + die "Please select a value for -p of 2 or more!\n" unless ($parallel > 1); if ($parallel > 4){ - warn "Attention: using more than 4 cores per alignment thread has been reported to have diminishing returns. If possible try to limit -p to a value of 4\n"; sleep(2); + warn "Attention: early reports suggested that high values of -p to have diminishing returns. Please test different values using a small subset of data for your hardware setting.\n"; sleep(1); } push @aligner_options,"-p $parallel"; push @aligner_options,'--reorder'; ## re-orders the Bowtie 2 or HISAT2 output so that it does match the input files. This is abolutely required for parallelization to work. @@ -9916,7 +9916,7 @@ Bowtie 2/ HISAT2 parallelization options: and synchronize when parsing reads and outputting alignments. Searching for alignments is highly parallel, and speedup is close to linear. Increasing -p increases Bowtie 2's memory footprint. E.g. when aligning to a human genome index, increasing -p from 1 to 8 increases the memory footprint - by a few hundred megabytes. This option is only available if bowtie is linked with the pthreads + by a few hundred megabytes. This option is only available if Bowtie 2 is linked with the pthreads library (i.e. if BOWTIE_PTHREADS=0 is not specified at build time). In addition, this option will automatically use the option '--reorder', which guarantees that output SAM records are printed in an order corresponding to the order of the reads in the original input file, even when -p is set From a3fefa6ca6a7feb6581ba45049f805e927053ce1 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Wed, 23 Aug 2023 16:20:22 +0200 Subject: [PATCH 06/12] Update bismark Removed exit 0; statement for runs with multiple input files --- bismark | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bismark b/bismark index 8026a15..f8f272b 100755 --- a/bismark +++ b/bismark @@ -921,7 +921,7 @@ foreach my $filename (@filenames){ warn "Nucleotide coverage statistics are currently only available for BAM or CRAM files\n\n"; } } - exit 0; + # exit 0; # will terminate after a single supplied file.... } else{ # If multiple files were supplied as the command line, like so: @@ -9994,6 +9994,6 @@ Bismark BAM/SAM OUTPUT (default): Each read of paired-end alignments is written out in a separate line in the above format. -Last modified on 28 May 2023 +Last modified on 23 August 2023 HOW_TO } From e16bb23779aa78437a03298ea7f3f6853253aab8 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Wed, 23 Aug 2023 16:23:40 +0200 Subject: [PATCH 07/12] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c9473..9b1999c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Bismark Changelog +## Changelog for Bismark v0.24.1dev + +### Bismark + +- removed an `exit 0` that would terminate runs after processing a single (set of) input file(s). + ## Changelog for Bismark v0.24.1 (release on 29 May 2023) - Added new [documentation website](http://felixkrueger.github.io/Bismark/), built using [Material for Mkdocs](https://squidfunk.github.io/mkdocs-material/). Thanks to @ewels for a great (late-night) effort to break up and restructure what had become a fairly unwieldy monolithic beast From 1d9d65963605628121d427d3940e2dec29f91543 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Thu, 24 Aug 2023 17:02:37 +0200 Subject: [PATCH 08/12] Update CHANGELOG.md Added coverage file merging scripts. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 406d4f5..b9836dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Changed the path to Samtools to custom variable ([#609](https://github.com/FelixKrueger/Bismark/issues/609)) +Added scripts for merging coverage files (e.g. for when R1 and R2 had been run in single-end mode) ## Changelog for Bismark v0.24.1 (release on 29 May 2023) From 33f031edb52ba5f2ccff3319d4101945350d54da Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Sat, 9 Sep 2023 19:40:48 +0100 Subject: [PATCH 09/12] GC context file now have the threshold set to 1 as intended --- coverage2cytosine | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/coverage2cytosine b/coverage2cytosine index f86ac4c..9481cbe 100755 --- a/coverage2cytosine +++ b/coverage2cytosine @@ -23,7 +23,7 @@ use Carp; my %chromosomes; # storing sequence information of all chromosomes/scaffolds my %processed; # keeping a record of which chromosomes have been processed my %context_summary; # storing methylation values for all contexts for NOMe-seq or scNMT-experiments -my $coverage2cytosine_version = 'v0.24.1'; +my $coverage2cytosine_version = 'v0.24.1dev'; my ($output_dir,$genome_folder,$zero,$CpG_only,$CX_context,$split_by_chromosome,$parent_dir,$coverage_infile,$cytosine_out,$merge_CpGs,$gc_context,$gzip,$tetra,$nome,$disco,$threshold,$drach) = process_commandline(); @@ -708,6 +708,12 @@ sub generate_GC_context_report { warn "="x82,"\n"; warn "Methylation information for GC context will now be written to a GpC-context report\n"; warn "="x82,"\n\n"; + + warn "For the GC report, positions need to have coverage of at least 1 call. The threshold currently is: $threshold\n"; + if ($threshold == 0){ + warn "Setting threshold to 1\n"; + $threshold = 1; + } sleep (2); my $number_processed = 0; @@ -981,6 +987,8 @@ sub generate_GC_context_report { # if Cs were not covered at all they are not written out if ($meth_bottom + $nonmeth_bottom >= $threshold){ + + # warn ("methylation bottom strand: $meth_bottom\nnon-methylation bottom strand: $nonmeth_bottom\nThreshold: $threshold\n\n"); sleep (1); my $percentage = sprintf ("%.6f",$meth_bottom/ ($meth_bottom + $nonmeth_bottom) *100); if ($nome and ($context_bottom eq 'CG') ){ # not reporting these (see point 2. above) @@ -1965,12 +1973,12 @@ sub process_commandline{ print << "VERSION"; - Bismark Methylation Extractor Module - - coverage2cytosine + Bismark Methylation Extractor Module - + coverage2cytosine - Bismark coverage2cytosine Version: $coverage2cytosine_version - Copyright 2010-22 Felix Krueger, Altos Bioinformatics - https://github.com/FelixKrueger/Bismark + Version: $coverage2cytosine_version + Copyright 2010-23 Felix Krueger, Altos Bioinformatics + https://github.com/FelixKrueger/Bismark VERSION @@ -2231,7 +2239,7 @@ The genome-wide cytosine methylation output file is tab-delimited in the followi - Script last modified: 06 Oct 2020 + Script last modified: 09 Sep 2023 EOF ; From 9bf9f940231deff3c3d578a3ea678d13145f6242 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Sat, 9 Sep 2023 19:44:51 +0100 Subject: [PATCH 10/12] Update CHANGELOG.md fixing coverage bug in coverage2cytosine when `--gc_context` was specified --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9836dd..d43eaf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ Added scripts for merging coverage files (e.g. for when R1 and R2 had been run in single-end mode) +### coverage2cytosine + +- set threshold reads to 1 (if it was 0) for `--gc_context` as intended and mentioned in the help text. Fixes [#621](https://github.com/FelixKrueger/Bismark/issues/621) + ## Changelog for Bismark v0.24.1 (release on 29 May 2023) - Added new [documentation website](http://felixkrueger.github.io/Bismark/), built using [Material for Mkdocs](https://squidfunk.github.io/mkdocs-material/). Thanks to @ewels for a great (late-night) effort to break up and restructure what had become a fairly unwieldy monolithic beast From 5e970a7f72d775b0741985fc9bd3897ec1193635 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Wed, 27 Sep 2023 08:57:08 +0100 Subject: [PATCH 11/12] Update CHANGELOG.md preparing release --- CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d43eaf7..8409b0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Bismark Changelog -## Changelog for Bismark v0.24.1dev +## Changelog for Bismark v0.24.2 (release on 27 Sep 2023) ### Bismark @@ -10,12 +10,14 @@ - Changed the path to Samtools to custom variable ([#609](https://github.com/FelixKrueger/Bismark/issues/609)) -Added scripts for merging coverage files (e.g. for when R1 and R2 had been run in single-end mode) - ### coverage2cytosine - set threshold reads to 1 (if it was 0) for `--gc_context` as intended and mentioned in the help text. Fixes [#621](https://github.com/FelixKrueger/Bismark/issues/621) + +Added scripts for merging coverage files (e.g. for when R1 and R2 had been run in single-end mode) + + ## Changelog for Bismark v0.24.1 (release on 29 May 2023) - Added new [documentation website](http://felixkrueger.github.io/Bismark/), built using [Material for Mkdocs](https://squidfunk.github.io/mkdocs-material/). Thanks to @ewels for a great (late-night) effort to break up and restructure what had become a fairly unwieldy monolithic beast From e3fec9dfb4acb013ee5b25623684e890ff46ab08 Mon Sep 17 00:00:00 2001 From: Felix Krueger Date: Wed, 27 Sep 2023 09:01:50 +0100 Subject: [PATCH 12/12] Preparing release --- NOMe_filtering | 2 +- bam2nuc | 2 +- bismark | 2 +- bismark2bedGraph | 2 +- bismark2report | 2 +- bismark2summary | 2 +- bismark_genome_preparation | 2 +- bismark_methylation_extractor | 2 +- coverage2cytosine | 2 +- deduplicate_bismark | 2 +- filter_non_conversion | 2 +- merge_coverage_files_ARGV.py | 2 -- methylation_consistency | 2 +- 13 files changed, 12 insertions(+), 14 deletions(-) diff --git a/NOMe_filtering b/NOMe_filtering index 4010f3d..0fc326e 100755 --- a/NOMe_filtering +++ b/NOMe_filtering @@ -23,7 +23,7 @@ use Carp; my %chromosomes; # storing sequence information of all chromosomes/scaffolds my %processed; # keeping a record of which chromosomes have been processed -my $nome_version = 'v0.24.1'; +my $nome_version = 'v0.24.2'; my ($output_dir,$genome_folder,$zero,$CpG_only,$CX_context,$split_by_chromosome,$parent_dir,$coverage_infile,$cytosine_out,$merge_CpGs,$gc_context,$gzip,$nome) = process_commandline(); diff --git a/bam2nuc b/bam2nuc index 986feaf..6490893 100755 --- a/bam2nuc +++ b/bam2nuc @@ -31,7 +31,7 @@ my %freqs; # keeping a record of which chromosomes have been processed my %genomic_freqs; my %processed; -my $bam2nuc_version = 'v0.24.1'; +my $bam2nuc_version = 'v0.24.2'; my ($output_dir,$genome_folder,$parent_dir,$samtools_path,$genome_freq_only) = process_commandline(); diff --git a/bismark b/bismark index 095634f..b3e574d 100755 --- a/bismark +++ b/bismark @@ -25,7 +25,7 @@ use lib "$RealBin/../lib"; my $parent_dir = getcwd(); -my $bismark_version = 'v0.24.1dev'; +my $bismark_version = 'v0.24.2'; my $copyright_dates = "2010-23"; my $start_run = time(); diff --git a/bismark2bedGraph b/bismark2bedGraph index 2dcec77..a7872b9 100755 --- a/bismark2bedGraph +++ b/bismark2bedGraph @@ -21,7 +21,7 @@ use Carp; ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . -my $bismark2bedGraph_version = 'v0.24.1'; +my $bismark2bedGraph_version = 'v0.24.2'; my @bedfiles; my @methylcalls = qw (0 0 0); # [0] = methylated, [1] = unmethylated, [2] = total diff --git a/bismark2report b/bismark2report index a94e8ac..3ce2a03 100755 --- a/bismark2report +++ b/bismark2report @@ -20,7 +20,7 @@ use lib "$RealBin/../lib"; ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . -my $bismark2report_version = 'v0.24.1'; +my $bismark2report_version = 'v0.24.2'; my (@alignment_reports,@dedup_reports,@splitting_reports,@mbias_reports,@nuc_reports); my ($output_dir,$verbose,$manual_output_file) = process_commandline(); diff --git a/bismark2summary b/bismark2summary index f0dbe5d..dd2cfd3 100755 --- a/bismark2summary +++ b/bismark2summary @@ -22,7 +22,7 @@ use lib "$RealBin/../lib"; ## You should have received a copy of the GNU General Public License ## along with this program. If not, see . -my $bismark_version = '0.24.1'; +my $bismark_version = '0.24.2'; # Last modified 09 11 2020 diff --git a/bismark_genome_preparation b/bismark_genome_preparation index 2857e50..b504938 100755 --- a/bismark_genome_preparation +++ b/bismark_genome_preparation @@ -42,7 +42,7 @@ my %genomic_freqs; # storing the genomic sequence composition my %freqs; -my $bismark_version = 'v0.24.1'; +my $bismark_version = 'v0.24.2'; my $copyright_date = '2010-23'; my $last_modified = "19 May 2022"; diff --git a/bismark_methylation_extractor b/bismark_methylation_extractor index b9ed086..1139157 100755 --- a/bismark_methylation_extractor +++ b/bismark_methylation_extractor @@ -29,7 +29,7 @@ my $parent_dir = getcwd(); my %fhs; -my $version = 'v0.24.1'; +my $version = 'v0.24.2'; my ($ignore,$genomic_fasta,$single,$paired,$full,$report,$no_overlap,$merge_non_CpG,$output_dir,$no_header,$bedGraph,$remove,$coverage_threshold,$counts,$cytosine_report,$genome_folder,$zero,$CpG_only,$CX_context,$split_by_chromosome,$sort_size,$samtools_path,$gzip,$ignore_r2,$mbias_off,$mbias_only,$gazillion,$ample_mem,$ignore_3prime,$ignore_3prime_r2,$multicore,$yacht,$ucsc) = process_commandline(); ### only needed for bedGraph output diff --git a/coverage2cytosine b/coverage2cytosine index 9481cbe..e8d531a 100755 --- a/coverage2cytosine +++ b/coverage2cytosine @@ -23,7 +23,7 @@ use Carp; my %chromosomes; # storing sequence information of all chromosomes/scaffolds my %processed; # keeping a record of which chromosomes have been processed my %context_summary; # storing methylation values for all contexts for NOMe-seq or scNMT-experiments -my $coverage2cytosine_version = 'v0.24.1dev'; +my $coverage2cytosine_version = 'v0.24.2'; my ($output_dir,$genome_folder,$zero,$CpG_only,$CX_context,$split_by_chromosome,$parent_dir,$coverage_infile,$cytosine_out,$merge_CpGs,$gc_context,$gzip,$tetra,$nome,$disco,$threshold,$drach) = process_commandline(); diff --git a/deduplicate_bismark b/deduplicate_bismark index 08c4ca7..850eaeb 100755 --- a/deduplicate_bismark +++ b/deduplicate_bismark @@ -7,7 +7,7 @@ use Cwd; ### This script is supposed to remove alignments to the same position in the genome which can arise by e.g. PCR amplification ### Paired-end alignments are considered a duplicate if both partner reads start and end at the exact same position -my $dedup_version = 'v0.24.1'; +my $dedup_version = 'v0.24.2'; my @filenames; my ($single,$paired,$global_single,$global_paired,$samtools_path,$bam,$rrbs,$multiple,$output_dir,$outfile,$parallel) = process_commandline(); diff --git a/filter_non_conversion b/filter_non_conversion index ba5dabf..73d1f98 100755 --- a/filter_non_conversion +++ b/filter_non_conversion @@ -22,7 +22,7 @@ $|++; ## along with this program. If not, see . my $parent_dir = getcwd(); -my $filter_version = 'v0.24.1'; +my $filter_version = 'v0.24.2'; my ($global_single,$global_paired,$samtools_path,$threshold,$consecutive,$percentage_cutoff,$minimum_count) = process_commandline(); diff --git a/merge_coverage_files_ARGV.py b/merge_coverage_files_ARGV.py index c19dffc..2accaa4 100755 --- a/merge_coverage_files_ARGV.py +++ b/merge_coverage_files_ARGV.py @@ -14,8 +14,6 @@ # print_options(options) - - def parse_options(): parser = argparse.ArgumentParser(description="Set base-name to write merged Bismark coverage files to") parser.add_argument("-b","--basename", type=str, help="Basename of file to write merged coverage output to (default 'merged_coverage_file')", default="merged_coverage_file.cov.gz") diff --git a/methylation_consistency b/methylation_consistency index e3bc08a..60fdff7 100755 --- a/methylation_consistency +++ b/methylation_consistency @@ -3,7 +3,7 @@ use warnings; use strict; use Getopt::Long; -my $VERSION = "0.24.1"; +my $VERSION = "0.24.2"; my ($min_count,$global_single,$global_paired,$lower_threshold,$upper_threshold,$samtools_path,$chh) = process_commandline(); if ($chh){