Giter Club home page Giter Club logo

batmeth2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

batmeth2's Issues

File Mmul_8.0.1_chroms_w_lambda.fa-GtoA.ind.25 Cannot be opened ....

Hi,
I am encountering the error "Mmul_8.0.1_chroms_w_lambda.fa-GtoA.ind.25 Cannot be opened ..." when trying to run batmeth2 align. The Mmul_8.0.1_chroms_w_lambda.fa-GtoA files are present in the indexed reference genome directory, although none have the suffix "ind.25". I've attached a screenshot of the run log with the error. Any help is appreciated!

image

Install error: collect2: error: ld returned 1 exit status

Dear GuoliangLi,
I am getting error while installing BatMeth2 on ubuntu. Please let me know if I am missing any dependencies.

make all-recursive
make[1]: Entering directory '/home/ubuntu/software/BatMeth2-BatMeth2-v2.1'
Making all in src
make[2]: Entering directory '/home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src'
g++ -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -o penguin print.o filters.o utils.o batlib.o rqindex.o penguin.o map.o bfix.o BWT.o MiscUtilities.o MemManager.o TextConverter.o r250.o QSufSort.o ssw.o command.o swroutines.o iniparser.o inistrlib.o dictionary.o DNACount.o Timing.o Socket.o HSP.o HSPstatistic.o karlin.o fastsw.o
/usr/bin/ld: batlib.o: in function Analyze_File(INFILE&, LEN&)': /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:94: undefined reference to gzgets'
/usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:121: undefined reference to gzrewind' /usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:113: undefined reference to gzgets'
/usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:99: undefined reference to gzgets' /usr/bin/ld: batlib.o: in function Read_Tag_gz(void*, char, READ&)':
/home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:461: undefined reference to gzgets' /usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:465: undefined reference to gzgets'
/usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:469: undefined reference to gzgets' /usr/bin/ld: batlib.o:/home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/batlib.cpp:471: more undefined references to gzgets' follow
/usr/bin/ld: penguin.o: in function main': /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/penguin.cpp:368: undefined reference to gzopen'
/usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/penguin.cpp:369: undefined reference to gzopen' /usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/penguin.cpp:471: undefined reference to gzrewind'
/usr/bin/ld: /home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src/penguin.cpp:475: undefined reference to `gzrewind'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:362: penguin] Error 1
make[2]: Leaving directory '/home/ubuntu/software/BatMeth2-BatMeth2-v2.1/src'
make[1]: *** [Makefile:255: all-recursive] Error 1
make[1]: Leaving directory '/home/ubuntu/software/BatMeth2-BatMeth2-v2.1'
make: *** [Makefile:193: all] Error 2

Kindly let me know the issues.

Thank you,

Best,
Yongping

BatMeth2 installation error on ubuntu 17.10

Dear GuoliangLi,
I am getting error while installing BatMeth2 on ubuntu 17.10. Please let me know if I am missing any dependencies.
I followed instructions as follows:
u@u:/Downloads/BatMeth2-master$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working volatile... yes
checking for ptrdiff_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for vprintf... yes
checking for _doprnt... no
checking for floor... no
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for pow... no
checking for socket... yes
checking for sqrt... no
checking for strchr... yes
checking for strdup... yes
checking for strtoul... yes
checking Checking for SIMD support and for a gcc bug...... OK...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating scripts/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
###########################
u@u:
/Downloads/BatMeth2-master$ make
#####After running make i am getting error (a part of which I have pested as below)
g++ -Wall -fmessage-length=50 -o batDMR batDMR.cpp regression.o combine_pvals.o merge.o /home/u/Downloads/BatMeth2-master/src/batDMR/GenomicRegion.o /home/u/Downloads/BatMeth2-master/src/batDMR/MethpipeFiles.o -I/home/u/Downloads/BatMeth2-master/src/batDMR -I./ -lgsl -lgslcblas -lm
In file included from /usr/include/c++/7/ext/hash_map:60:0,
from batDMR.cpp:25:
/usr/include/c++/7/backward/backward_warning.h:32:2: warning: #warning
This file includes at least one deprecated or
antiquated header which may be removed without
further notice at a future date. Please use a
non-deprecated interface with equivalent
functionality instead. For a listing of
replacement headers and interfaces, consult
the file backward_warning.h. To disable this
warning use -Wno-deprecated.
[-Wcpp]
#warning
^~~~~~~
batDMR.cpp: In function
‘int main(int, const
char**)’:
batDMR.cpp:812:7: warning: this
‘if’ clause does not
guard...
[-Wmisleading-indentation]
if (!design_file)
^~
batDMR.cpp:815:2: note: ...this
statement, but the latter is misleadingly
indented as if it were guarded by the
‘if’
string table_filename = (outTmp
+"_combined.file.temp.txt") ;
^~~~~~
batDMR.cpp:970:7: warning: this
‘if’ clause does not
guard...
[-Wmisleading-indentation]
if (!bed_file)
^~
batDMR.cpp:972:2: note: ...this
statement, but the latter is misleadingly
indented as if it were guarded by the
‘if’
cerr << "Definding DMR." << end
l;
#######################

Kindly let me know the issues.

Thank you,

Sincere Regards,
Abdul

Can the bam output result of bismark2 be directly used in BatMeth2?

Dear Prof. Li
Very good software!
I have a question, because the data we used to analyze WGBS is relatively large, and there are many samples, the sequence alignment process takes more time, so we want to know whether the bam file output by bismark2 can be directly used in BatMeth2?

Thank you for your generous help!
Best!

outPrefix.align.log.txt

hi
I run pipeline mode, and have some errors.

report2html did not output "statistic html",
outPrefix.align.log.txt did not be produced by alignment

cp: 无法获取'./outPrefix.log.txt' 的文件状态(stat): 没有那个文件或目录
File ./outPrefix.align.log.txt Cannot be opened ....

[E::sam_parse1] incomplete aux field

Hi,

I am encountering "incomplete aux field" when I am looking to execute pipel subcommand. please see detailed error log here.

[MM] /production/BatMeth2-master/bin/memalign c2t -1 Bis-AG876_S3_R1_001.fastq.clean.gz -2 Bis-AG876_S3_R2_001.fastq.clean.gz -o Bis-AG876.type2 | /production/BatMeth2-master/bin/bwame mem -t 8 -C -p -Y /production/References/ViralIndexes/batMeth/type2/EBV_type_2_complete_genome_FASTA_GenBank_NC_009334.1.fa.batmeth2.fa - | samtools sort -@ 8 -o ./Bis-AG876.type2.sort.bam -
Process paired-end reads!
Process input file: Bis-AG876_S3_R1_001.fastq.clean.gz, Bis-AG876_S3_R2_001.fastq.clean.gz
[M::mem_align] read 0 ALT contigs
[M::process] read 91692 sequences (10874058 bp)...
[M::process] 0 single-end sequences; 91692 paired-end sequences
[M::mem_pestat] # candidate unique pairs for (FF, FR, RF, RR): (1, 38061, 1, 0)
[M::mem_pestat] skip orientation FF as there are not enough pairs
[M::mem_pestat] analyzing insert size distribution for orientation FR...
[M::mem_pestat] (25, 50, 75) percentile: (104, 129, 164)
[M::mem_pestat] low and high boundaries for computing mean and std.dev: (1, 284)
[M::mem_pestat] mean and std.dev: (137.14, 44.39)
[M::mem_pestat] low and high boundaries for proper pairs: (1, 344)
[M::mem_pestat] skip orientation RF as there are not enough pairs
[M::mem_pestat] skip orientation RR as there are not enough pairs
[M::mem_process_seqs] Processed 91692 reads in 6.221 CPU sec, 0.785 real sec
[E::sam_parse1] incomplete aux field
samtools sort: truncated file. Aborting

problem during installation

kindly help me solve with issue.Thanks

pkgupta@pkgupta:~/Downloads/bisulfite/BatMeth2-master$ make

make[2]: Leaving directory '/Downloads/bisulfite/BatMeth2-master/src'
Making all in scripts
make[2]: Entering directory '/Downloads/bisulfite/BatMeth2-master/scripts'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/Downloads/bisulfite/BatMeth2-master/scripts'
Making all in src/batDMR
make[2]: Entering directory '/Downloads/bisulfite/BatMeth2-master/src/batDMR'
g++ -Wall -fmessage-length=50 -c -o regression.o regression.cpp -I/Downloads/bisulfite/BatMeth2-master/src/batDMR -I./ -lgsl -lgslcblas -lm
g++ -Wall -fmessage-length=50 -c -o combine_pvals.o combine_pvals.cpp -I/Downloads/bisulfite/BatMeth2-master/src/batDMR -I./ -lgsl -lgslcblas -lm
combine_pvals.cpp: In member
function ‘double
DistanceCorrelation::correlation(const
std::vector&, const
std::vector&)’:
combine_pvals.cpp:195:16: error: ‘gsl_stats_correlation’
was not declared in this scope
double corr= gsl_stats_correlation
( gsl_x.vector.data, stride,gsl_y.vector.dat
a, stride,x.size());
^~~~~~~~~~~~~~~~~~~~~

combine_pvals.cpp:195:16: note: suggested
alternative:
‘gsl_stats_char_min’
double corr= gsl_stats_correlation
( gsl_x.vector.data, stride,gsl_y.vector.dat
a, stride,x.size());
^~~~~~~~~~~~~~~~~~~~~

            gsl_stats_char_min

make[2]: *** [Makefile:74: combine_pvals.o] Error 1
make[2]: Leaving directory '/Downloads/bisulfite/BatMeth2-master/src/batDMR'
make[1]: *** [Makefile:257: all-recursive] Error 1
make[1]: Leaving directory '/Downloads/bisulfite/BatMeth2-master'
make: *** [Makefile:193: all] Error 2

*** stack smashing detected ***: terminated

./calmeth -b KB1_pe.sorted.bam -m KB1 -Q 20 --remove_dup --coverage 4 -nC 1 --Regions 600 --step 50000 -g 60_C_idella_male_LG.fa
BatMeth2::Split v2.0
Coverage and validC: 4 500, 1
Load Genome.. 60_C_idella_male_LG.fa

Longest chr: 57044276

Processing 1 out of 1. File: KB1_pe.sorted.bam, 1

start process alignment file
*** stack smashing detected ***: terminated
Aborted (core dumped)
how to slove.

batmeth2 calmeth basic_string::_M_construct null not valid

Hi , i run batmeth2 calmeth -g ref/hg38.fa -b chr1.sort.bam -m batmeth2.cal
then get the error , bellow is the log

[2022:05:11 10:59:12] Processed 63013009 reads.
[2022:05:11 10:59:19] Processed 64013011 reads.
[2022:05:11 10:59:26] Processed 65013023 reads.
[2022:05:11 10:59:33] Processed 66013025 reads.
[2022:05:11 10:59:40] Processed 67013025 reads.
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Aborted (core dumped)

/bin not created

hello and thanks for the software--
am running ubuntu 18.04; after I perform
./configure
and
make -nogzip
I enter
make copy -nogzip
which appears to work fine, but no /bin directory is created, so I cannot use any of the tools
thanks for any help you can offer.
here is output from make copy -nogzip:

g++ ./src/calmeth.cpp -o ./src/calmeth -m64 -I./src/samtools-0.1.18/ -L./src/samtools-0.1.18/ -lbam -lz
g++ ./src/splitSam.cpp -o ./src/splitSam -m64 -I./src/samtools-0.1.18/ -L./src/samtools-0.1.18/ -lbam -lz -pthread
if [ -d "bin" ]; then echo bin exists; else mkdir bin; fi
g++ -o ./scripts/BatMeth2 ./scripts/BatMeth2.cpp -lpthread
g++ ./scripts/report2html.cpp -o ./scripts/report2html
cp ./scripts/BatMeth2 ./bin/batmeth2
cp scripts/strip.pl bin
cp scripts/report2html bin
cp scripts/b2c.pl bin
cp scripts/build_complement bin
cp scripts/filter.pl bin
cp scripts/build_indexX bin
cp scripts/build_all bin
cp scripts/ann2loc.pl bin
cp scripts/build_location.pl bin
cp scripts/build_revcmp bin
cp scripts/complement.pl bin
cp scripts/ReverseComplteFQ bin
cp src/bwtformatdb bin
cp src/reverse bin
cp src/penguin bin
cp src/penguin-a bin
cp src/calmeth bin
cp src/batmethindex bin
cp src/filter bin
cp bwtformatdb.ini bin
cp src/splitSam bin
cp src/methyGff bin
cp src/methyPlot bin
cp src/.r bin
cp scripts/
.r bin
cp src/DMCannotation* bin
cp scripts/GeneMethHeatmap ./bin/
cp scripts/chrLenExtract ./bin
cp scripts/combined.element* bin
cp scripts/batmeth2-align bin
cp scripts/BatMeth2 bin
cp scripts/build_ann_location.pl bin
cp scripts/preGenome bin
cp src/batDMR/batDMR ./bin
cp src/genome_filter bin
cp src/build_index_rrbs bin

BAM output

Hello,
I was wondering whether BatMeth2 can also directly output the alignments in BAM format? Currently I have to sort the alignments with samtools, but the SAM file is really large and creates problems on the hard disks and I have another much bigger dataset, which I am afraid will not be able to be analysed if there is only SAM output.

Thanks for any help,
Marcel

Make install error

Tried with a couple different versions of gcc and gsl all fail with the same error. Looks like a problem with the source.

BatMeth2$ make install
g++ -I/apps/gcc/5.2.0/gsl/2.1/include ./src/calmeth.cpp -o ./src/calmeth -m64 -I./src/samtools-0.1.18/ -L./src/samtools-0.1.18/ -lbam -lz
g++ -I/apps/gcc/5.2.0/gsl/2.1/include ./src/splitSam.cpp -o ./src/splitSam -m64 -I./src/samtools-0.1.18/ -L./src/samtools-0.1.18/ -lbam -lz -pthread
if [ -d "bin" ]; then echo bin exists; else mkdir bin; fi
bin exists
cp scripts/batmeth2_to_bigwig.py bin
cp scripts/bedGraphToBigWig bin
cp scripts/bedSort bin
g++ -o ./scripts/BatMeth2 ./scripts/BatMeth2.cpp -lpthread
./scripts/BatMeth2.cpp:40:1: error: expected ‘,’ or ‘;’ before ‘float’
 float step = 0.01;
 ^
./scripts/BatMeth2.cpp: In function ‘void printparamter2(std::__cxx11::string, std::__cxx11::string)’:
./scripts/BatMeth2.cpp:247:393: error: ‘step’ was not declared in this scope
 ge\t%d\nmaxCoverage\t%d\nbinCoverage\t%d\nchromStep\t%d\nmethyGff\t----\nGene bins step\t%.3f\nDistance of upstream and downstream\t%d  ", threads, Qual, redup, region, sammeth, coverage, maxcoverage, binCover, chromstep, step, dista
                                                                                                                                                                                                                               ^
./scripts/BatMeth2.cpp: In function ‘int main(int, char**)’:
./scripts/BatMeth2.cpp:394:13: error: ‘step’ was not declared in this scope
             step = atof(argv[++i]);
             ^
./scripts/BatMeth2.cpp: In function ‘void annotation(std::__cxx11::string, std::__cxx11::string)’:
./scripts/BatMeth2.cpp:971:178: error: no match for ‘operator+’ (operand types are ‘std::__cxx11::basic_string<char>’ and ‘float’)
             cmd = abspath + "methyGff" + " -o " + outputdir + output_prefix + " -G " + genome_index + " -gtf " + gfffile + " -m " + methratio + " -B -P --TSS --TTS --GENE -hs " + hs;
                                                                                                                                                                                  ^
In file included from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/vector:65:0,
                 from ./scripts/BatMeth2.cpp:9:
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/stl_bvector.h:387:3: note: candidate: std::_Bit_const_iterator std::operator+(std::ptrdiff_t, const std::_Bit_const_iterator&)
   operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
   ^
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/stl_bvector.h:387:3: note:   no known conversion for argument 1 from ‘std::__cxx11::basic_string<char>’ to ‘std::ptrdiff_t {aka long int}’
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/stl_bvector.h:297:3: note: candidate: std::_Bit_iterator std::operator+(std::ptrdiff_t, const std::_Bit_iterator&)
   operator+(ptrdiff_t __n, const _Bit_iterator& __x)
   ^
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/stl_bvector.h:297:3: note:   no known conversion for argument 1 from ‘std::__cxx11::basic_string<char>’ to ‘std::ptrdiff_t {aka long int}’
In file included from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/string:52:0,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/locale_classes.h:40,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/ios_base.h:41,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ios:42,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ostream:38,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/iostream:39,
                 from ./scripts/BatMeth2.cpp:1:
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.h:4834:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT)
     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.h:4834:5: note:   template argument deduction/substitution failed:
./scripts/BatMeth2.cpp:971:180: note:   deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘float’)
             cmd = abspath + "methyGff" + " -o " + outputdir + output_prefix + " -G " + genome_index + " -gtf " + gfffile + " -m " + methratio + " -B -P --TSS --TTS --GENE -hs " + hs;
                                                                                                                                                                                    ^
In file included from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/string:52:0,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/locale_classes.h:40,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/ios_base.h:41,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ios:42,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ostream:38,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/iostream:39,
                 from ./scripts/BatMeth2.cpp:1:
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.h:4818:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)   
     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.h:4818:5: note:   template argument deduction/substitution failed:
./scripts/BatMeth2.cpp:971:180: note:   mismatched types ‘const _CharT*’ and ‘float’
             cmd = abspath + "methyGff" + " -o " + outputdir + output_prefix + " -G " + genome_index + " -gtf " + gfffile + " -m " + methratio + " -B -P --TSS --TTS --GENE -hs " + hs;
                                                                                                                                                                                    ^
In file included from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/string:53:0,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/locale_classes.h:40,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/ios_base.h:41,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ios:42,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ostream:38,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/iostream:39,
                 from ./scripts/BatMeth2.cpp:1:
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.tcc:1167:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
     ^
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.tcc:1167:5: note:   template argument deduction/substitution failed:
./scripts/BatMeth2.cpp:971:180: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘float’
             cmd = abspath + "methyGff" + " -o " + outputdir + output_prefix + " -G " + genome_index + " -gtf " + gfffile + " -m " + methratio + " -B -P --TSS --TTS --GENE -hs " + hs;
                                                                                                                                                                                    ^
In file included from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/string:53:0,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/locale_classes.h:40,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/ios_base.h:41,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ios:42,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/ostream:38,
                 from /apps/compilers/gcc/5.2.0/include/c++/5.2.0/iostream:39,
                 from ./scripts/BatMeth2.cpp:1:
/apps/compilers/gcc/5.2.0/include/c++/5.2.0/bits/basic_string.tcc:1151:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) 
     operator+(const _CharT* __lhs,

Question: Conda recipe for installation?

Hello there,
In the last few days I've been trying to install BatMeth2 and I've got a plethora of errors. Similar to errors of #14 .

Still, there's casually a recipe for conda installation (I can't install outside conda enviroments),

Cheers,
Luis Alfonso.

Unique alignment

Hi,

I was wondering how does BatMeth2 determine if an alignment is unique for paired-end alignment? I couldn't find this in the paper or the manual. Is there some way I can filter uniquely aligned paired-end reads from the .bam file?

Harry

core dumped of BatMeth2

I have ran BatMeth2 align by the following commands:
'''
./BatMeth2 align -g Homo_sapiens.GRCh38.dna.primary_assembly.fa -1 ../../../ssd/SRR5453774_1_val_1.fq -2 ../../../ssd/SRR5453774_2_val_2.fq -o SRR5453774.bam -p 28
'''

it reported:
'''
++++++++++++++++++++++penguin: penguin.cpp:5530: void Print_Pair(std::priority_queue<Alignment_Pair, std::vector<Alignment_Pair>, Comp_Align_Pair>&, Hit_Info&, Hit_Info&, char, char, READ&, READ&, unsigned char*, char, char, FILE*, Final_Hit&, Final_Hit&, READ&, READ&, MEMX&, MEMX&, BWT*, BWT*): Assertion `T.Loc!=INT_MAX' failed.
/home/nhpcc502/chhy/BatMeth2-master/bin/batmeth2-align: line 36: 87197 Aborted (core dumped) $DIR/penguin $CMDLINE
'''
could you help me to solve this problem? Thank you very much.

problem on methyGff!

Dear Prof. Qiangwei,

Good day!

I tried to run your BatMeth2 on Arabidopsis thaliana reads from NCBI SRA database as test run for the program. I used TAIR10.1 as reference and TAIR10.1.gff as annotation file. However, the BatMeth2 program only finished halfway.

I received several error messages as below:

  1. samtools sort -@ 4 -o ./SRR8100591_bathmeth2.sort.bam ./SRR8100591_bathmeth2.sam >> ./SRR8100591_bathmeth2.run.log 2>&1
    [W::sam_parse1] mapped query cannot have zero coordinate; treated as unmapped

  2. /home/user/Downloads/BatMeth2/bin/methyGff -o ./SRR8100591_bathmeth2 -G /mnt/D/Liaw/WGS-Bi/arabidopsis/Arabidopsis_thaliana/TAIR10.1/GCF_000001735.4_TAIR10.1_genomic.fa -gff /mnt/D/Liaw/WGS-Bi/arabidopsis/Arabidopsis_thaliana/TAIR10.1/GCF_000001735.4_TAIR10.1_genomic.gff -m ./SRR8100591_bathmeth2.methratio.txt -B -P --TSS --TTS --GENE -s 0.025 >> ./SRR8100591_bathmeth2.run.log 2>&1
    Segmentation fault (core dumped)

  3. Error in file(file, "rt") : cannot open the connection
    Calls: read.table -> file
    Execution halted
    elements.methylevel.Aver.OutFile: ./SRR8100591_bathmeth2.Methenrich.pdf

  4. Error in file(file, "rt") : cannot open the connection
    Calls: read.table -> file
    In addition: Warning message:
    In file(file, "rt") :
    cannot open file './SRR8100591_bathmeth2.AverMethylevel.1.txt': No such file or directory
    Execution halted
    Rscript /home/user/Downloads/BatMeth2/bin/density_plot_with_methyl_oneSample_oneGff.r ./SRR8100591_bathmeth2.methBins.txt ./SRR8100591_bathmeth2.annoDensity.1.txt ./SRR8100591_bathmeth2.density.pdf SRR8100591_bathmeth2 >> ./SRR8100591_bathmeth2.run.log 2>&1

  5. 260910011469183923772383Error in file(file, "rt") : cannot open the connection
    Calls: read.table -> file
    In addition: Warning message:
    In file(file, "rt") :
    cannot open file './SRR8100591_bathmeth2.annoDensity.1.txt': No such file or directory
    Execution halted

  6. BatMeth2: mC
    Usage: Rscript thisRfile Inputfile1(mCdensity) OutFile1.pdf Inputfile2(mCcatero) OutFile2.pdf
    Warning message:
    In read.table(Infile, row.names = 1) :
    incomplete final line found by readTableHeader on './SRR8100591_bathmeth2.mCdensity.txt'
    null device
    1
    null device
    1
    null device
    1
    null device
    1

  7. Usage: GeneMethHeatmap sample1 sample2[None] CG-ceil CHG-ceil CHH-ceil
    ./SRR8100591_bathmeth2
    sort: cannot read: ./SRR8100591_bathmeth2.TSS.cg.1.txt: No such file or directory
    sort: cannot read: ./SRR8100591_bathmeth2.TTS.cg.1.txt: No such file or directory
    sort: cannot read: ./SRR8100591_bathmeth2.TSS.chg.1.txt: No such file or directory
    sort: cannot read: ./SRR8100591_bathmeth2.TTS.chg.1.txt: No such file or directory
    sort: cannot read: ./SRR8100591_bathmeth2.TSS.chh.1.txt: No such file or directory
    sort: cannot read: ./SRR8100591_bathmeth2.TTS.chh.1.txt: No such file or directory

  8. heatmap
    Loading required package: pheatmap
    [1] "Package pheatmap is loaded correctly"
    Error in read.table(paste(args[1], ".cg", sep = ""), sep = "\t") :
    no lines available in input
    Execution halted

May I know what is the problem causing these errors? and how can I fix these problem?

Thank you.

Best regards,
Teo

Fatal error: glibc detected an invalid stdio handle!

Dear Prof. Guoliang,

I tried to use the test data from your team to run BatMeth2 using my workstation Ubuntu 18.04.1 LTS Intel Xeon(R) CPU E3-1245 v5 ` 3.50GHz x 8.

I builded the genome.fa index using build_index. Then I aligned the R1 and R2 reads using BatMeth2 align. First trial with BatMeth2 align was succesful but then BatMeth2 calmeth failed. Second attempt of BatMeth2 align failed with the following error message.

[ Program directory ] /home/user/Downloads/BatMeth2/bin/
[ Program name ] BatMeth2
[ Workdir ] /home/user/Downloads/BatMeth2/test
[ outputdir ] ./
[ BatMeth2 ] Alignment R2.fq.gz ...

./meth1.sam.run.log 2>&1
/home/user/Downloads/BatMeth2/bin/batmeth2-align -g genome.fa -p 6 -i R2.fq.gz -o ./meth1.sam.sam >> ./meth1.sam.run.log 2>&1
Fatal error: glibc detected an invalid stdio handle

my command line is based on your TestDataUsagePipeline.pdf as followed BatMeth2 align -g genome.fa -i R1.fq.gz -i R2.fq.gz -p 6 -o meth1.sam

How can I solve this problem?

Thank you.

Best regards,
Teo
meth1.sam.run.log

batDMR outputs nothing

I ran batDMR to compare two samples. However, the output was empty. I noticed that there was a chrLenFile, however, it is also empty. How do I fix this problem? Thank you!

/opt/BatMeth2/bin/batmeth2-align: not found

root@45221d1c9fab:/opt/BatMeth2/bin# ./BatMeth2 align
[MM] /opt/BatMeth2/bin/batmeth2-align
sh: 1: /opt/BatMeth2/bin/batmeth2-align: not found

BatMeth2 downloaded in 2022-05-09

FM index load error

I am getting "FM index load error" when indexing with BatMeth2 build_index rrbs. Below is an excerpt from the stdout; it looks like the error occurs as the last step each time Index Builder for Batman runs. Can you advise on how to resolve this? Your help is appreciated.

Finished saving BWT.  Elapsed time = 0.31 s

Loading BWT...
Finished loading BWT.  Elapsed time = 0.39 s

Building SA value...
SA Value generated : 35450147
SA Value generated : 70900294
SA Value generated : 106350441
SA Value generated : 141800588
SA Value generated : 177250735
SA Value generated : 212700882
SA Value generated : 248151029
SA Value generated : 283601176
SA Value generated : 319051323
SA Value generated : 354501470
SA Value generated : 354501474
Finished building SA value.  Elapsed time = 468.15 s

Building cached SA index...
Finished building cached SA index.  Elapsed time = 2.14 s

Finished all tasks.  Total elapsed time = 1388.96 s

Maximum amount of memory allocated:  2285794912
Maximum amount of memory dispatched: 2284652980
Number of char   :  2836011784
Bit per char     :  6.44

Deleting auxilliary files...
FM index load error 
-= Index Builder for Batman =-
Building on /gscratch/csde/smacklab/genomes/batmeth2
Stripping Mmul_8.0.1_chroms_w_lambda.fa and filtering nucleotides...
Converting G->A
Creating FASTA file of Reverse of the Genome...
Creating FM index of reverse genome...

The issue of downstream methylation of genes in the BathMeth2 software

I found a problem when using your software, which is that when I use the BatMeth2 methyGff function, I cannot obtain the methylation annotation file downstream of the gene,cause i can not find the parameter to generate this . and i want to get the result like this:
downstream_chrom downstream_regionStart downstream_strand downstream_context C_count downstream_CT_count downstream_regionID
# ex. Chr1 3631 + CG 45 1314 AT1G01010


DNA methylation level distributions in body and -bp flanking sequences. The distance of upstream and downstream. default:2000

-B/--body

Calculate the DNA methylation level of per region.

-P/--promoter

Calculate the DNA methylation level of per region's upstream [d]k.

--TSS

Caculate matrix for TSS. [Outfile: outPrefix.TSS.cg.txt]

--TTS

Caculate matrix for TTS. [Outfile: outPrefix.TTS.cg.n.txt]

--GENE

Caculate matrix for TSS. [Outfile: outPrefix.TSS.cg.txt]

--TTS

Caculate matrix for GENE and flank [d]k. [outPrefix.GENE.cg.txt]

-s/--step

Gene body and their flanking sequences using an overlapping sliding window of 2% of the sequence length at a step of 1% of the sequence length. So default step: 0.01 (1%)

-bl/--bodyLen

Body length to which all regions will be fit. (default: same as -d)

-S/--chromStep

Caculate the density of genes/TEs in chromsome using an overlapping sliding window of 100000bp at a step of 50000bp, must equal "-s" in Split.. default step: 50000(bp)

--help/-h

Print help


But this result is quite important for my analysis. Do you have any corresponding scripts to implement this function?
I hope you can reply to my request in your busy schedule. Thank you very much

samtools sort truncated file

Hi,

I'm running BatMeth2 doing:
BatMeth2 align -1 R1.fastq.gz -2 R2.fastq.gz -g reference.fa -of BAM -o pwet -p 30
and I have the following issue:
[E::sam_parse1] numeric value out of allowed range
samtools sort: truncated file. Aborting

Thanks in advance for the help,
Paul

Version number

Hi,

May I ask what are the releases of Batmeth2(what versions existed in the past), and what the current version is? I couldn't find any information on GitHub or in the manual.

Thank you!

How to use batDMR?

Hi Guoliang

What file format for the --element parameter?

Can Both -L and --element be combined?

How to compare Promoter or gene diffDMR between two samples using batDMR ?

Thanks.

Calmeth output file

Hi, I want to know the "loci" in calmeth output file is 1-base or 0-base. Thanks!

installation error

make all-recursive
make[1]: Entering directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2'
Making all in src/mealign
make[2]: Entering directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src/mealign'
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS utils.c -o utils.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS kthread.c -o kthread.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS kstring.c -o kstring.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS ksw.c -o ksw.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwt.c -o bwt.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bntseq.c -o bntseq.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwa.c -o bwa.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwamem.c -o bwamem.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwamem_pair.c -o bwamem_pair.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwamem_extra.c -o bwamem_extra.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS malloc_wrap.c -o malloc_wrap.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS QSufSort.c -o QSufSort.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwt_gen.c -o bwt_gen.o
bwt_gen.c: In function 'BWTIncBuildRelativeRank':
bwt_gen.c:879:10: warning: variable 'oldInverseSa0RelativeRank' set but not used [-Wunused-but-set-variable]
879 | bgint_t oldInverseSa0RelativeRank = 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
bwt_gen.c: In function 'BWTIncMergeBwt':
bwt_gen.c:953:15: warning: variable 'bitsInWordMinusBitPerChar' set but not used [-Wunused-but-set-variable]
953 | unsigned int bitsInWordMinusBitPerChar;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS rope.c -o rope.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS rle.c -o rle.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS is.c -o is.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtindex.c -o bwtindex.o
bwtindex.c: In function 'bwa_idx_build':
bwtindex.c:272:44: warning: unknown conversion type character '/' in format [-Wformat=]
272 | if (bwa_verbose >= 3) fprintf(stderr, "%./2f sec\n", (float)(clock() - t) / CLOCKS_PER_SEC);
| ^
bwtindex.c:272:41: warning: too many arguments for format [-Wformat-extra-args]
272 | if (bwa_verbose >= 3) fprintf(stderr, "%./2f sec\n", (float)(clock() - t) / CLOCKS_PER_SEC);
| ^~~~~~~~~~~~~
ar -csru libbwa.a utils.o kthread.o kstring.o ksw.o bwt.o bntseq.o bwa.o bwamem.o bwamem_pair.o bwamem_extra.o malloc_wrap.o QSufSort.o bwt_gen.o rope.o rle.o is.o bwtindex.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwashm.c -o bwashm.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwase.c -o bwase.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwaseqio.c -o bwaseqio.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtgap.c -o bwtgap.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtaln.c -o bwtaln.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bamlite.c -o bamlite.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwape.c -o bwape.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS kopen.c -o kopen.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS pemerge.c -o pemerge.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS maxk.c -o maxk.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_core.c -o bwtsw2_core.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_main.c -o bwtsw2_main.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_aux.c -o bwtsw2_aux.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwt_lite.c -o bwt_lite.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_chain.c -o bwtsw2_chain.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS fastmap.c -o fastmap.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwtsw2_pair.c -o bwtsw2_pair.o
gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS main.c -o main.o
gcc -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS bwashm.o bwase.o bwaseqio.o bwtgap.o bwtaln.o bamlite.o bwape.o kopen.o pemerge.o maxk.o bwtsw2_core.o bwtsw2_main.o bwtsw2_aux.o bwt_lite.o bwtsw2_chain.o fastmap.o bwtsw2_pair.o main.o -o bwame -L. -lbwa -lm -lz -lpthread -lrt
make[2]: Leaving directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src/mealign'
Making all in src/samtools-0.1.18
make[2]: Entering directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src/samtools-0.1.18'
make[3]: Entering directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src/samtools-0.1.18'
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bgzf.c -o bgzf.o
bgzf.c: In function 'bgzf_close':
bgzf.c:630:8: warning: variable 'count' set but not used [-Wunused-but-set-variable]
630 | int count, block_length = deflate_block(fp, 0);
| ^~~~~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. kstring.c -okstring.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_aux.c -obam_aux.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam.c -o bam.o
In file included from /beegfs/home/wangshouchuang_L/miniconda3/x86_64-conda-linux-gnu/sysroot/usr/include/string.h:637,
from bam.h:47,
from bam.c:5:
bam.c: In function 'bam_header_write':
bam.c:116:2: warning: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string ofthe same length [-Wstringop-truncation]
116 | strncpy(buf, "BAM\001", 4);
| ^~~~~~~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_import.c-o bam_import.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. sam.c -o sam.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_index.c -o bam_index.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_pileup.c-o bam_pileup.o
bam_pileup.c: In function 'resolve_cigar2':
bam_pileup.c:75:9: warning: variable 'is_head' set but not used [-Wunused-but-set-variable]
75 | int k, is_head = 0;
| ^~~~~~~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_lpileup.c -o bam_lpileup.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_md.c -o bam_md.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. razf.c -o razf.o
In file included from /beegfs/home/wangshouchuang_L/miniconda3/x86_64-conda-linux-gnu/sysroot/usr/include/string.h:637,
from razf.c:37:
razf.c: In function 'razf_open_w':
razf.c:178:2: warning: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
178 | strncpy((char*)rz->header->extra, "RAZF", 4);
| ^~~~~~~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. faidx.c -o faidx.o
faidx.c: In function 'fai_load':
faidx.c:277:5: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
277 | else
| ^~~~
faidx.c:280:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
280 | if (fp == 0) {
| ^~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bedidx.c -o bedidx.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. knetfile.c -o knetfile.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_sort.c -o bam_sort.o
In file included from bam_sort.c:9:
bam_sort.c:309:26: warning: 'bam1_lt' is static but used in inline function '__ks_insertsort_sort' which is not static
309 | KSORT_INIT(sort, bam1_p, bam1_lt)
| ^~~~~~~
ksort.h:148:25: note: in definition of macro 'KSORT_INIT'
148 | for (j = i; j > s && __sort_lt(*j, *(j-1)); --j) {
| ^~~~~~~~~
bam_sort.c:53:27: warning: 'heap_lt' is static but used in inline function '__ks_insertsort_heap' which is not static
53 | KSORT_INIT(heap, heap1_t, heap_lt)
| ^~~~~~~
ksort.h:148:25: note: in definition of macro 'KSORT_INIT'
148 | for (j = i; j > s && __sort_lt(*j, *(j-1)); --j) {
| ^~~~~~~~~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. sam_header.c-o sam_header.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_reheader.c -o bam_reheader.o
bam_reheader.c: In function 'bam_reheader':
bam_reheader.c:11:16: warning: variable 'old' set but not used [-Wunused-but-set-variable]
11 | bam_header_t *old;
| ^~~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. kprobaln.c -o kprobaln.o
kprobaln.c: In function 'kpa_glocal':
kprobaln.c:78:21: warning: variable 'is_diff' set but not used [-Wunused-but-set-variable]
78 | int bw, bw2, i, k, is_diff = 0, is_backward = 1, Pr;
| ^~~~~~~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I. bam_cat.c -obam_cat.o
/beegfs/home/wangshouchuang_L/miniconda3/bin/x86_64-conda-linux-gnu-ar -csru libbam.a bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o bam_pileup.o bam_lpileup.o bam_md.o razf.o faidx.o bedidx.o knetfile.o bam_sort.o sam_header.o bam_reheader.o kprobaln.o bam_cat.o
make[3]: Leaving directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src/samtools-0.1.18'
make[3]: Entering directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src/samtools-0.1.18/bcftools'
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. bcf.c -o bcf.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. vcf.c -o vcf.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. bcfutils.c -o bcfutils.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. prob1.c-o prob1.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. em.c -oem.o
em.c: In function 'bcf_em1':
em.c:174:12: warning: variable 'n2' set but not used [-Wunused-but-set-variable]
174 | int i, n, n2;
| ^~
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. kfunc.c-o kfunc.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. kmin.c -o kmin.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. index.c-o index.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. fet.c -o fet.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. mut.c -o mut.o
gcc -c -g -Wall -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1 -I.. -I. bcf2qcall.c -o bcf2qcall.o
/beegfs/home/wangshouchuang_L/miniconda3/bin/x86_64-conda-linux-gnu-ar -csru libbcf.a bcf.o vcf.o bcfutils.o prob1.o em.o kfunc.o kmin.o index.o fet.o mut.o bcf2qcall.o
make[3]: Leaving directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src/samtools-0.1.18/bcftools'
make[3]: Entering directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src/samtools-0.1.18/misc'
make[3]: Nothing to be done for 'lib'.
make[3]: Leaving directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src/samtools-0.1.18/misc'
make[2]: Leaving directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src/samtools-0.1.18'
Making all in src
make[2]: Entering directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src'
g++ -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /beegfs/home/wangshouchuang_L/miniconda3/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /beegfs/home/wangshouchuang_L/miniconda3/include -o genome2cg genome2cg.cpp -I/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src -I./ -lz
g++: error: unrecognized command line option ‘-std=c++17’
g++: error: unrecognized command line option ‘-fno-plt’
g++: error: unrecognized command line option ‘-std=c++17’
g++: error: unrecognized command line option ‘-fno-plt’
make[2]: *** [Makefile:70: MOMO] Error 1
make[2]: Leaving directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2/src'
make[1]: *** [Makefile:255: all-recursive] Error 1
make[1]: Leaving directory '/beegfs/home/wangshouchuang_L/workspace/09.tea/01.methylation/soft/BatMeth2'
make: *** [Makefile:193: all] Error 2

Please help me solve this problem, it looks like a g++ problem, but I don't have root permission

In read.table(Infile, row.names = 1) : incomplete final line found by readTableHeader on './SRR8100584_sub_bathmeth2.mCdensity.txt'

Dear Prof. Guoliang,

I tried to run BatMeth2 using the latest version and used 10000 reads from SRR8100594.sra. The latest version managed to generate most of the graph and figure except Heatmap and Differential DNA methylation analysis.

I again noticed some error in the BatMeth2 program when I checked the .run.log file. Here is the errors:
Rscript /home/user/Downloads/BatMeth2/bin/mCdensity.r ./SRR8100584_sub_bathmeth2.mCdensity.txt ./SRR8100584_sub_bathmeth2.mCdensity.pdf ./SRR8100584_sub_bathmeth2.mCcatero.txt ./SRR8100584_sub_bathmeth2.mCcatero.pdf >> ./SRR8100584_sub_bathmeth2.run.log 2>&1
BatMeth2: mC
Usage: Rscript thisRfile Inputfile1(mCdensity) OutFile1.pdf Inputfile2(mCcatero) OutFile2.pdf
Warning message:
In read.table(Infile, row.names = 1) :
incomplete final line found by readTableHeader on './SRR8100584_sub_bathmeth2.mCdensity.txt'
null device
1
null device
1
null device
1
null device
1
/home/user/Downloads/BatMeth2/bin/GeneMethHeatmap ./SRR8100584_sub_bathmeth2 None 0.6 0.2 0.1 >> ./SRR8100584_sub_bathmeth2.run.log 2>&1
Usage: GeneMethHeatmap sample1 sample2[None] CG-ceil CHG-ceil CHH-ceil
./SRR8100584_sub_bathmeth2
heatmap
Loading required package: pheatmap
[1] "Package pheatmap is loaded correctly"
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
line 82595 did not have 162 elements
Calls: read.table -> scan
Execution halted

Thank you.
Best regards,
Teo
SRR8100584_sub_bathmeth2.run.log

I have tried all of the 4 release packages. None of them can be installed in ubuntu 18.04. The error is below. please guide me thank you very much!

package here download is batMeth2-master.

./configyre # is ok.

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working volatile... yes
checking for ptrdiff_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for vprintf... yes
checking for _doprnt... no
checking for floor... no
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for pow... no
checking for socket... yes
checking for sqrt... no
checking for strchr... yes
checking for strdup... yes
checking for strtoul... yes
checking Checking for SIMD support and for a gcc bug...... OK...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating scripts/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

then, make. The problem is coming!

g++ -DHAVE_CONFIG_H -I. -I.. -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -MT fastsw.o -MD -MP -MF .deps/fastsw.Tpo -c -o fastsw.o fastsw.cpp
mv -f .deps/fastsw.Tpo .deps/fastsw.Po
g++ -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -o penguin print.o filters.o utils.o batlib.o rqindex.o penguin.o map.o bfix.o BWT.o MiscUtilities.o MemManager.o TextConverter.o r250.o QSufSort.o ssw.o command.o swroutines.o iniparser.o inistrlib.o dictionary.o DNACount.o Timing.o Socket.o HSP.o HSPstatistic.o karlin.o fastsw.o
penguin.o:在函数‘main’中:
/mnt/sdb/zq/software/BatMeth2-master/src/penguin.cpp:368:对‘gzopen’未定义的引用
/mnt/sdb/zq/software/BatMeth2-master/src/penguin.cpp:471:对‘gzrewind’未定义的引用
/mnt/sdb/zq/software/BatMeth2-master/src/penguin.cpp:369:对‘gzopen’未定义的引用
/mnt/sdb/zq/software/BatMeth2-master/src/penguin.cpp:475:对‘gzrewind’未定义的引用
batlib.o:在函数‘Analyze_File(INFILE&, LEN&)’中:
/mnt/sdb/zq/software/BatMeth2-master/src/batlib.cpp:94:对‘gzgets’未定义的引用
/mnt/sdb/zq/software/BatMeth2-master/src/batlib.cpp:99:对‘gzgets’未定义的引用
/mnt/sdb/zq/software/BatMeth2-master/src/batlib.cpp:121:对‘gzrewind’未定义的引用
/mnt/sdb/zq/software/BatMeth2-master/src/batlib.cpp:113:对‘gzgets’未定义的引用
batlib.o:在函数‘Read_Tag_gz(void*, char, READ&)’中:
/mnt/sdb/zq/software/BatMeth2-master/src/batlib.cpp:461:对‘gzgets’未定义的引用
/mnt/sdb/zq/software/BatMeth2-master/src/batlib.cpp:465:对‘gzgets’未定义的引用
/mnt/sdb/zq/software/BatMeth2-master/src/batlib.cpp:469:对‘gzgets’未定义的引用
/mnt/sdb/zq/software/BatMeth2-master/src/batlib.cpp:471:对‘gzgets’未定义的引用
batlib.o:/mnt/sdb/zq/software/BatMeth2-master/src/batlib.cpp:585: 跟着更多未定义的参考到 gzgets
collect2: error: ld returned 1 exit status
Makefile:361: recipe for target 'penguin' failed
make[2]: *** [penguin] Error 1
make[2]: 离开目录“/mnt/sdb/zq/software/BatMeth2-master/src”
Makefile:255: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: 离开目录“/mnt/sdb/zq/software/BatMeth2-master”
Makefile:193: recipe for target 'all' failed
make: *** [all] Error 2

when I use make -nogzip and make copy -nogzip. it looks like ok (without errors). But the /bin was not appeared. Which was strangely.

**

make -nogzip

**

if test ! -f config.h; then
rm -f stamp-h1;
make stamp-h1;
else :; fi
make all-recursive
make[1]: 进入目录“/mnt/sdb/zq/software/BatMeth2-master”
fail= failcom='exit 1';
for f in x $MAKEFLAGS; do
case $f in
= | --[!k]*);;
k) failcom='fail=yes';;
esac;
done;
dot_seen=no;
target=echo all-recursive | sed s/-recursive//;
list='src scripts src/batDMR'; for subdir in $list; do
echo "Making $target in $subdir";
if test "$subdir" = "."; then
dot_seen=yes;
local_target="$target-am";
else
local_target="$target";
fi;
(CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make $local_target)
|| eval $failcom;
done;
if test "$dot_seen" = "no"; then
make "$target-am" || exit 1;
fi; test -z "$fail"
Making all in src
make[2]: 进入目录“/mnt/sdb/zq/software/BatMeth2-master/src”
rm -f penguin
g++ -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -o penguin print.o filters.o utils.o batlib.o rqindex.o penguin.o map.o bfix.o BWT.o MiscUtilities.o MemManager.o TextConverter.o r250.o QSufSort.o ssw.o command.o swroutines.o iniparser.o inistrlib.o dictionary.o DNACount.o Timing.o Socket.o HSP.o HSPstatistic.o karlin.o fastsw.o
g++ -DHAVE_CONFIG_H -I. -I.. -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -MT penguin-a.o -MD -MP -MF .deps/penguin-a.Tpo -c -o penguin-a.o penguin-a.cpp
mv -f .deps/penguin-a.Tpo .deps/penguin-a.Po
rm -f penguin-a
g++ -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -o penguin-a print.o filters.o utils.o batlib.o rqindex.o penguin-a.o map.o bfix.o BWT.o MiscUtilities.o MemManager.o TextConverter.o r250.o QSufSort.o ssw.o command.o swroutines.o iniparser.o inistrlib.o dictionary.o DNACount.o Timing.o Socket.o HSP.o HSPstatistic.o karlin.o fastsw.o
gcc -DHAVE_CONFIG_H -I. -I.. -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -MT bwtformatdb.o -MD -MP -MF .deps/bwtformatdb.Tpo -c -o bwtformatdb.o bwtformatdb.c
mv -f .deps/bwtformatdb.Tpo .deps/bwtformatdb.Po
gcc -DHAVE_CONFIG_H -I. -I.. -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -MT BWTConstruct.o -MD -MP -MF .deps/BWTConstruct.Tpo -c -o BWTConstruct.o BWTConstruct.c
mv -f .deps/BWTConstruct.Tpo .deps/BWTConstruct.Po
rm -f bwtformatdb
gcc -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -o bwtformatdb bwtformatdb.o BWT.o BWTConstruct.o MiscUtilities.o MemManager.o TextConverter.o r250.o QSufSort.o iniparser.o inistrlib.o dictionary.o DNACount.o Timing.o Socket.o HSP.o HSPstatistic.o karlin.o
g++ -DHAVE_CONFIG_H -I. -I.. -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -MT reverse.o -MD -MP -MF .deps/reverse.Tpo -c -o reverse.o reverse.cpp
mv -f .deps/reverse.Tpo .deps/reverse.Po
rm -f reverse
g++ -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -o reverse reverse.o
g++ -DHAVE_CONFIG_H -I. -I.. -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -MT filter.o -MD -MP -MF .deps/filter.Tpo -c -o filter.o filter.cpp
mv -f .deps/filter.Tpo .deps/filter.Po
rm -f filter
g++ -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -o filter filter.o
g++ -DHAVE_CONFIG_H -I. -I.. -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -MT methyGff.o -MD -MP -MF .deps/methyGff.Tpo -c -o methyGff.o methyGff.cpp
mv -f .deps/methyGff.Tpo .deps/methyGff.Po
rm -f methyGff
g++ -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -o methyGff methyGff.o
g++ -DHAVE_CONFIG_H -I. -I.. -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -MT build_index_rrbs.o -MD -MP -MF .deps/build_index_rrbs.Tpo -c -o build_index_rrbs.o build_index_rrbs.cpp
mv -f .deps/build_index_rrbs.Tpo .deps/build_index_rrbs.Po
rm -f build_index_rrbs
g++ -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lz -lm -pthread -g -O2 -o build_index_rrbs build_index_rrbs.o
make[2]: 离开目录“/mnt/sdb/zq/software/BatMeth2-master/src”
Making all in scripts
make[2]: 进入目录“/mnt/sdb/zq/software/BatMeth2-master/scripts”
make[2]: 对“all”无需做任何事。
make[2]: 离开目录“/mnt/sdb/zq/software/BatMeth2-master/scripts”
Making all in src/batDMR
make[2]: 进入目录“/mnt/sdb/zq/software/BatMeth2-master/src/batDMR”
g++ -Wall -fmessage-length=50 -c -o regression.o regression.cpp -I/mnt/sdb/zq/software/BatMeth2-master/src/batDMR -I./ -lgsl -lgslcblas -lm
g++ -Wall -fmessage-length=50 -c -o combine_pvals.o combine_pvals.cpp -I/mnt/sdb/zq/software/BatMeth2-master/src/batDMR -I./ -lgsl -lgslcblas -lm
g++ -Wall -fmessage-length=50 -c -o merge.o merge.cpp -I/mnt/sdb/zq/software/BatMeth2-master/src/batDMR -I./ -lgsl -lgslcblas -lm
g++ -Wall -fmessage-length=50 -c -o /mnt/sdb/zq/software/BatMeth2-master/src/batDMR/GenomicRegion.o /mnt/sdb/zq/software/BatMeth2-master/src/batDMR/GenomicRegion.cpp -I/mnt/sdb/zq/software/BatMeth2-master/src/batDMR -I./ -lgsl -lgslcblas -lm
g++ -Wall -fmessage-length=50 -c -o /mnt/sdb/zq/software/BatMeth2-master/src/batDMR/MethpipeFiles.o /mnt/sdb/zq/software/BatMeth2-master/src/batDMR/MethpipeFiles.cpp -I/mnt/sdb/zq/software/BatMeth2-master/src/batDMR -I./ -lgsl -lgslcblas -lm
g++ -Wall -fmessage-length=50 -o batDMR batDMR.cpp regression.o combine_pvals.o merge.o /mnt/sdb/zq/software/BatMeth2-master/src/batDMR/GenomicRegion.o /mnt/sdb/zq/software/BatMeth2-master/src/batDMR/MethpipeFiles.o -I/mnt/sdb/zq/software/BatMeth2-master/src/batDMR -I./ -lgsl -lgslcblas -lm
make[2]: 离开目录“/mnt/sdb/zq/software/BatMeth2-master/src/batDMR”
make[2]: 进入目录“/mnt/sdb/zq/software/BatMeth2-master”
if test ! -f config.h; then
rm -f stamp-h1;
make stamp-h1;
else :; fi
make[2]: 离开目录“/mnt/sdb/zq/software/BatMeth2-master”
make[1]: 离开目录“/mnt/sdb/zq/software/BatMeth2-master”

**

make copy -nogzip

**

g++ ./src/calmeth.cpp -o ./src/calmeth -m64 -I./src/samtools-0.1.18/ -L./src/samtools-0.1.18/ -lbam -lz
g++ ./src/splitSam.cpp -o ./src/splitSam -m64 -I./src/samtools-0.1.18/ -L./src/samtools-0.1.18/ -lbam -lz -pthread
if [ -d "bin" ]; then echo bin exists; else mkdir bin; fi
g++ -o ./scripts/BatMeth2 ./scripts/BatMeth2.cpp -lpthread
g++ ./scripts/report2html.cpp -o ./scripts/report2html
cp ./scripts/BatMeth2 ./bin/batmeth2
cp scripts/strip.pl bin
cp scripts/report2html bin
cp scripts/b2c.pl bin
cp scripts/build_complement bin
cp scripts/filter.pl bin
cp scripts/build_indexX bin
cp scripts/build_all bin
cp scripts/ann2loc.pl bin
cp scripts/build_location.pl bin
cp scripts/build_revcmp bin
cp scripts/complement.pl bin
cp scripts/ReverseComplteFQ bin
cp src/bwtformatdb bin
cp src/reverse bin
cp src/penguin bin
cp src/penguin-a bin
cp src/calmeth bin
cp src/batmethindex bin
cp src/filter bin
cp bwtformatdb.ini bin
cp src/splitSam bin
cp src/methyGff bin
cp src/methyPlot bin
cp src/.r bin
cp scripts/
.r bin
cp src/DMCannotation* bin
cp scripts/GeneMethHeatmap ./bin/
cp scripts/chrLenExtract ./bin
cp scripts/combined.element* bin
cp scripts/batmeth2-align bin
cp scripts/BatMeth2 bin
cp scripts/build_ann_location.pl bin
cp scripts/preGenome bin
cp src/batDMR/batDMR ./bin
cp src/genome_filter bin
cp src/build_index_rrbs bin

**

the installation fold is without /bin :

**
aclocal.m4 config.h config.status depcomp Makefile.am multirun.conf scripts
autom4te.cache config.h.in configure install-sh Makefile.in output_details.pdf src
bwtformatdb.ini config.log configure.in Makefile missing README.md stamp-h1

I have installed all the dependencies. The problem is still there which I can not fix. Thank you for your help!

BatMeth2 not found

I have installed BatMeth2, but when trying to build the index, I get the error "BatMeth2: command not found"

请问这里找不到日志文件是怎么回事?

非常感谢作者开源自己开发的甲基化比对工具BatMeth2,我在使用默认pipeline比对流程中,发现最后一步生成报告的时候会在这个位置卡住。
image
可能是这个命令没有找到日志文件导致的。
image
目录下确实没有这两个文件,HTML只有标题。
请问这个需要怎么设置一下呢?

genome index

Hi I'm trying to index human genome hg38 using BatMeth2 but it gave me error messages. I tried to index your genome.fa file from your google drive and it gave me the same error. Could you help to take a look?

Parsing FASTA file..
ParseFASTToPacked() : FASTA file does not begin with '>'!
Deleting auxilliary files...
mv: cannot stat /genome.fa.non.fmv': No such file or directory mv: cannot stat /genome.fa.non.bwt': No such file or directory
mv: cannot stat /genome.fa.non.sa': No such file or directory rm: cannot remove /genome.fa.non.sai': No such file or directory
BWTLoad() : cannot open bwtCodeFile!

install error "bin/ld: cannot find -lz"

Dear Prof. Li,

Thank you so much for your nice tool for DNA methylation analysis.
When I installed BatMeth2, I get an error during "make".

image
I googled it, and got an answer that libz.so cannot be found. However, libz is in my conda path. I added it to $LD_LIBRARY_PATH, but it still does not work. So, may I get some suggestions from you?
gcc version 4.4.7 gsl-2.4 zlib-1.2.11

Thank you for your time in advance.
Zhao Long

image
image

batDMR error

Dear Li,
I used batDMR to indentify DMR,with each sample have 3 replicates,my code is:
BatMeth2 batDMR -g ~/reference/rice/rice7.fa -o_dm CG_DMC.txt -o_dmr CG_DMR.txt -1 2M-1R_batmethinput.txt 2M-2R-_batmethinput.txt 2M-3R-LDA3002_batmethinput.txt -2 4M-1R_batmethinput.txt 4M-2R_batmethinput.txt 4M-3R-batmethinput.txt -methdiff 0.3 -mindmc 5 -maxdis 1000 -FDR 0.05 -context CG
but when Runing differential test, it returned to an error as below:
BatMeth2: DMR v1.0
combined file done!
Runing differential test ...
There is a row withincorrect number of proportions.
So what's wrong with it?

How to generate bed or bigWig files for the list of DMRs?

Dear developer,

Thank you for such easy-use and excellent tool!

As you mentioned in your article We also provide bed or bigWig files for the list of DMRs. The DMRs can be visualized in a genome browser (Fig. 4b) with the generated bed or bigWig files., but now I don't know how to generate them?

Could you please help me?

Best,
Han

BatMeth2 calmeth calculates slowly.

Dear Prof. Li,

I hope this message finds you well. I am writing to express my gratitude for providing the methylation analysis software, which has been incredibly helpful to me in my recent projects.

However, I encountered an issue while using BatMeth2 calmeth for calculating methylation sites at the genome-wide level. I generated the necessary bam files using bismark, but the calmeth analysis has been running for the past two days without completion. I consulted the available documentation but was unable to find any parameters that could potentially speed up the analysis.

I would greatly appreciate any guidance or assistance you could provide to help resolve this issue.

Thank you once again for your support.

Best regards,
Shen

I have encountered some errors running BatMeth2 methyPlot?

Dear Prof. Guoliang,
Recently I was trying to do some analysis of methylation data, and when I used the test data (test data with "BatMeth2testdata", download in "https://drive.google.com/open?id=1SEpvJbkjwndYcpkd39T11lrBytEq_Mac" ) in BatMeth2, There is no problem with this step: "BatMeth2 pipel --fastp ~/anaconda3/envs/fastp/bin/fastp -1 R1.fq.gz -2 R2.fq.gz -g ./batmeth2index/genome.fa -o meth -p 2 --gff ./gene.gff" . but I ran into some problems while running this step "BatMeth2 methyPlot meth.methBins.txt meth.Methygenome.pdf 0.025 meth.Methylevel.1.txt meth.function.pdf TSS TTS meth.AverMethylevel.1.txt meth.Methenrich.pdf meth.annoDensity.1.txt meth.density.pdf meth meth.mCdensity.txt meth.mCdensity.pdf meth.mCcatero.txt jcmeth.mCcatero.pdf 0.6 0.1 0.1" , as following:

Error is as follows:
#################################################################################
BatMeth2: MethyPlot

Usage: methyPlot chromsome.bins.txt chrosome.methy.distri.pdf stepdefault:0.025 Infile1.from.batmeth2:methyGff out1.pdf starLabel endLabel Infile2 out2.pdf
eg: methyPlot chromsome.bins.txt chrosome.methy.distri.pdf 0.025 gene.meth.Methylevel.1.txt methlevel.pdf TSS TTS gene.meth.AverMethylevel.1.txt elements.pdf
Usage2: methyPlot chromsome.bins.txt chrosome.methy.distri.pdf 0.025 gene.meth.Methylevel.1.txt methlevel.pdf TSS TTS gene.meth.AverMethylevel.1.txt elements.pdf test.annoDensity.1.txt test.density.pdf sampleElmentName test.mCdensity.txt test.mCdensity.pdf test.mCcatero.txt test.mCcatero.pdf 0.8 0.1 0.1

Chromsome.bins.DNA.methylevel.Outfile: meth.Methygenome.pdf
BatMeth2: chrom_distribution
Usage: Rscript InputFile.from.Batmeth2:Split OutFile.pdf
eg:Rscript chrom_distribution.batmeth2.r test.bins.txt chrosome.methy.distri.pdf
null device
1
Error in par(mfrow = c(numchr * length(c), 1), mar = c(4, 4, 3, 2)) :
图形参数"mfrow"的值设得不对
停止执行
methylevel.elements.OutFile: meth.function.pdf
BatMeth2: methylevel.elements
Usage: Rscript methylevel.elements.r step(default:0.025) Input.from.Batmeth2:methyGff outfile.pdf xLab1 xLab2
eg: Rscript methylevel.elements.r 0.025 gene.meth.Methylevel.1.txt methlevel.pdf TSS TTS

null device
1
null device
1
null device
1
null device
1
null device
1
null device
1
null device
1
null device
1
elements.methylevel.Aver.OutFile: meth.Methenrich.pdf
Batmeth2: elements.methylevel.Aver
Usage:Rscript elements.methylevel.Aver.r Input.from.Batmeth2:methyGff outfile.pdf
eg: Rscript elements.methylevel.Aver.r gene.meth.AverMethylevel.1.txt elements.pdf

null device
1
null device
1
BatMeth2: density_plot_with_methyl.r
Usage: Rscript density_plot_with_methyl.r inputFile1 geneDensityFile output.pdf label1
eg: Rscript density_plot_with_methyl.r Cr_DJ.bins.strand.aver.txt Cr_DJ.geneBody.count.C.gffDensity.1.txt density.pdf Cr_DJ

30null device
1
null device
1
null device
1
null device
1
BatMeth2: mC
Usage: Rscript thisRfile Inputfile1(mCdensity) OutFile1.pdf Inputfile2(mCcatero) OutFile2.pdf
Warning message:
In read.table(Infile, row.names = 1) :
incomplete final line found by readTableHeader on 'meth.mCdensity.txt'
null device
1
null device
1
null device
1
null device
1
awk: 命令行:1: (FILENAME=meth.1.txt.sorted.raw.cg FNR=398) 致命错误: 试图除0
awk: 命令行:1: (FILENAME=meth.1.txt.sorted.raw.chg FNR=398) 致命错误: 试图除0
awk: 命令行:1: (FILENAME=meth.1.txt.sorted.raw.chh FNR=398) 致命错误: 试图除0
####################################################################################
R installed version is 3.6.3 and the required packages are installed (including "pheatmap","xtable","ggplot2","gridExtra","grid") with the Rscricpt "install.rpackages.r" in the directory "BatMeth2-BatMeth2-v2.1/bin" .

Some of the result files are shown below:
meth.methBins.txt
meth.1.txt.sorted.raw.cg.txt
meth.1.txt.sorted.raw.chg.txt
meth.1.txt.sorted.raw.chh.txt

Thank you.
Best regards,
wuhainan

Loading genome for test data freezes

I am trying to run BatMeth2. I tried to un on mm10 but after generating the indexed genome, when I run the BatMeth2 pipel, the pipeline get stuck in this step:

==============================================================
Loading genome: ./batmeth2index/genome.fa ...

I even downloaded the test data you provided here and have the same issue:

$ BatMeth2 pipel -1 R1.fq.gz -2 R2.fq.gz -g ./batmeth2index/genome.fa -o HMD -p 30 --gff ./gene.gff
[ Program directory ] /vol/analysis/hamed/wrkdir/soft/BatMeth2/bin/
[ Program name ] BatMeth
[ Workdir ] /vol/Analysis/hamed/wrkdir/mouse/methyl/test
[ outputdir ] ./
[ BatMeth2 ] Genome: ./batmeth2index/genome.fa
[ BatMeth2 ] Annotation, gtf: ./gene.gff; bed: None;
[ BatMeth2 ] Input file:  None, R1.fq.gz R2.fq.gz
[ BatMeth2 ] Outfile prefix: HMD
[ BatMeth2 ] Process Paramater file.
[ BatMeth2 ] Process Paramater file2.
[ BatMeth2 ] Alignment ...
[ BatMeth2 ] Alignment R1.fq.gz, R2.fq.gz...
 >> ./HMD.run.log 2>&1
/vol/analysis/hamed/wrkdir/soft/BatMeth2/bin/batmeth2-align -g ./batmeth2index/genome.fa -p 30 -i R1.fq.gz -i R2.fq.g
BatMeth2 v2.00
Read length 75
Max Gap : 200
==============================================================
Loading genome: ./batmeth2index/genome.fa ...

this has been running for 8 rs on the test data and no result or error, and my ram is getting still occupied more and more. For the test data, I assume it should be pretty fast since the genome was also about 2 Mb. Could you please let me know what is going on and how I can resolve the issue?

thanks

batmeth2 methgff

Chr01 332613000 . 22 610 Chr01.332613000.332613200
Chr01 332613201 . 22 610 Chr01.332613201.332613401
Chr01 332613401 . 22 610 Chr01.332613401.332613601
Chr01 332613601 . 22 610 Chr01.332613601.332613801
Chr01 332613801 . 22 610 Chr01.332613801.332614001
Chr01 332614001 . 22 610 Chr01.332614001.332614201
Chr01 332614201 . 22 610 Chr01.332614201.332614401
Chr01 332614401 . 22 610 Chr01.332614401.332614601
Chr01 332614601 . 22 610 Chr01.332614601.332614801
Chr01 332614801 . 22 610 Chr01.332614801.332615001
Chr01 332615001 . 22 610 Chr01.332615001.332615201
Chr01 332615201 . 22 610 Chr01.332615201.332615376
Chr02 1 . 22 610 Chr02.1.201
Chr02 201 . 22 610 Chr02.201.401
Chr02 401 . 22 610 Chr02.401.601
Chr02 601 . 22 610 Chr02.601.801
Chr02 801 . 22 610 Chr02.801.1001
Chr02 1001 . 22 610 Chr02.1001.1201
Chr02 1201 . 22 610 Chr02.1201.1401
Chr02 1401 . 22 610 Chr02.1401.1601
Chr02 1601 . 22 610 Chr02.1601.1801
Chr02 1801 . 22 610 Chr02.1801.2001
Chr02 2001 . 22 610 Chr02.2001.2201
Chr02 28000 . 47 47 Chr02.28000.28200
Chr02 57800 . 7 10 Chr02.57800.58000
Chr02 58000 . 2 10 Chr02.58000.58200
Chr02 59200 . 23 48 Chr02.59200.59400
Chr02 61800 . 12 24 Chr02.61800.62000
您好 老师,我在用batmeth2 methgff 计算区域甲基化水平时,对输出结果有点疑惑,软件输入的bed文件 0-based,输出结果中,不是很理解到底是1-based 还是0-based的,而且Chr01 最后的染色体数还超出了 我chr01界限1bp
BatMeth2 methyGff --coverage 4 -nC 1
--genome ../../batmeth_idx/st_8_filter_Chr.genome.fa
-b ../st_8_filter_Chr.genome.200bp_1based.bed3
--methratio ../../3.SiteAndSmallWindow/leaf_WGBS_rep1.methratio.txt
--out leaf_WGBS_rep1.200bp.methy

FM index load error on TAIR10.fa

Here is the command and the log:

[daijie20171011@compute01 index]$ BatMeth2 build_index TAIR10.fa

/gss1/home/daijie20171011/batmeth2/index
[ Program directory ] /gss1/home/daijie20171011/biosoft/BatMeth2/bin/
[ Program name ] BatMeth2
[ Workdir ] /gss1/home/daijie20171011/batmeth2/index
/gss1/home/daijie20171011/biosoft/BatMeth2/bin/build_all TAIR10.fa
-= Index Builder for Batman =-
Building on /gss1/home/daijie20171011/batmeth2/index
Stripping TAIR10.fa and filtering nucleotides...
Converting C->T
Creating FASTA file of Reverse of the Genome...
Creating FM index of reverse genome...
BWTFormatdb v1.0, Copyright (C) 2006, Wong Chi Kwong.
BWTFormatdb comes with ABSOLUTELY NO WARRENTY.
BWTFormatdb is free software, and you are welcome to
redistribute it under certain conditions.
For details type BWTFormatdb.

Loading /gss1/home/daijie20171011/biosoft/BatMeth2/bin/bwtformatdb.ini ..done.

Parse FASTA file : Y
Build BWT : Y
Build SA value : Y
Build SA index : Y

Show progress : Y

Parse FASTA :
Mask lower case : N
Random seed : 1567503216

Build BWT :
Target N Bits : 2.50
Occ value frequency : 256
Initial Max Build Size : 10000000 Inc Max Build Size : 10000000

Build SA value :
SA value frequency : 8

Build SA index :
SA index no. of char : 12

Annotation file : ./revTAIR10.fa-CtoT.ann
Ambigurity file : ./revTAIR10.fa-CtoT.amb
Packed DNA file : ./revTAIR10.fa-CtoT.pac
BWT Code file : ./revTAIR10.fa-CtoT.bwt
BWT Occ value file : ./revTAIR10.fa-CtoT.fmv
SA value file : ./revTAIR10.fa-CtoT.sa
Cached SA index file : ./revTAIR10.fa-CtoT.sai

Parsing FASTA file..
Finished. Parsed 1 sequences.
Elapsed time = 1.92 s

Building BWT..
10 iterations done. 29216502 characters processed.
20 iterations done. 51116198 characters processed.
30 iterations done. 68388198 characters processed.
40 iterations done. 82009526 characters processed.
50 iterations done. 92751014 characters processed.
60 iterations done. 101220726 characters processed.
70 iterations done. 107898326 characters processed.
80 iterations done. 113162150 characters processed.
90 iterations done. 117310742 characters processed.
Finished constructing BWT in 97 iterations. Elapsed time = 23.80 s

Saving BWT..
Finished saving BWT. Elapsed time = 0.02 s

Loading BWT...
Finished loading BWT. Elapsed time = 0.07 s

Building SA value...
SA Value generated : 1495846
SA Value generated : 2991692
SA Value generated : 4487538
SA Value generated : 5983384
SA Value generated : 7479230
SA Value generated : 8975076
SA Value generated : 10470922
SA Value generated : 11966768
SA Value generated : 13462614
SA Value generated : 14958460
SA Value generated : 14958469
Finished building SA value. Elapsed time = 8.57 s

Building cached SA index...
Finished building cached SA index. Elapsed time = 0.26 s

Finished all tasks. Total elapsed time = 34.64 s

Maximum amount of memory allocated: 162987932
Maximum amount of memory dispatched: 161182768
Number of char : 119667750
Bit per char : 10.78

Creating FM index of the genome...
BWTFormatdb v1.0, Copyright (C) 2006, Wong Chi Kwong.
BWTFormatdb comes with ABSOLUTELY NO WARRENTY.
BWTFormatdb is free software, and you are welcome to
redistribute it under certain conditions.
For details type BWTFormatdb.

Loading /gss1/home/daijie20171011/biosoft/BatMeth2/bin/bwtformatdb.ini ..done.

Parse FASTA file : Y
Build BWT : Y
Build SA value : Y
Build SA index : Y

Show progress : Y

Parse FASTA :
Mask lower case : N
Random seed : 1567503251

Build BWT :
Target N Bits : 2.50
Occ value frequency : 256
Initial Max Build Size : 10000000 Inc Max Build Size : 10000000

Build SA value :
SA value frequency : 8

Build SA index :
SA index no. of char : 12

Annotation file : TAIR10.fa-CtoT.non.ann
Ambigurity file : TAIR10.fa-CtoT.non.amb
Packed DNA file : TAIR10.fa-CtoT.non.pac
BWT Code file : TAIR10.fa-CtoT.non.bwt
BWT Occ value file : TAIR10.fa-CtoT.non.fmv
SA value file : TAIR10.fa-CtoT.non.sa
Cached SA index file : TAIR10.fa-CtoT.non.sai

Parsing FASTA file..
Finished. Parsed 7 sequences.
Elapsed time = 2.04 s

Building BWT..
10 iterations done. 29586359 characters processed.
20 iterations done. 51763335 characters processed.
30 iterations done. 69254039 characters processed.
40 iterations done. 83047927 characters processed.
50 iterations done. 93925543 characters processed.
60 iterations done. 102502631 characters processed.
70 iterations done. 109264919 characters processed.
80 iterations done. 114595543 characters processed.
90 iterations done. 118796855 characters processed.
Finished constructing BWT in 97 iterations. Elapsed time = 23.91 s

Saving BWT..
Finished saving BWT. Elapsed time = 0.02 s

Loading BWT...
Finished loading BWT. Elapsed time = 0.06 s

Building SA value...
SA Value generated : 1514781
SA Value generated : 3029562
SA Value generated : 4544343
SA Value generated : 6059124
SA Value generated : 7573905
SA Value generated : 9088686
SA Value generated : 10603467
SA Value generated : 12118248
SA Value generated : 13633029
SA Value generated : 15147810
SA Value generated : 15147817
Finished building SA value. Elapsed time = 8.96 s

Building cached SA index...
Finished building cached SA index. Elapsed time = 0.33 s

Finished all tasks. Total elapsed time = 35.33 s

Maximum amount of memory allocated: 164171740
Maximum amount of memory dispatched: 162366960
Number of char : 121182535
Bit per char : 10.72

Deleting auxilliary files...
FM index load error
-= Index Builder for Batman =-
Building on /gss1/home/daijie20171011/batmeth2/index
Stripping TAIR10.fa and filtering nucleotides...
Converting G->A
Creating FASTA file of Reverse of the Genome...
Creating FM index of reverse genome...
BWTFormatdb v1.0, Copyright (C) 2006, Wong Chi Kwong.
BWTFormatdb comes with ABSOLUTELY NO WARRENTY.
BWTFormatdb is free software, and you are welcome to
redistribute it under certain conditions.
For details type BWTFormatdb.

Loading /gss1/home/daijie20171011/biosoft/BatMeth2/bin/bwtformatdb.ini ..done.

Parse FASTA file : Y
Build BWT : Y
Build SA value : Y
Build SA index : Y

Show progress : Y

Parse FASTA :
Mask lower case : N
Random seed : 1567503288

Build BWT :
Target N Bits : 2.50
Occ value frequency : 256
Initial Max Build Size : 10000000 Inc Max Build Size : 10000000

Build SA value :
SA value frequency : 8

Build SA index :
SA index no. of char : 12

Annotation file : ./revTAIR10.fa-GtoA.ann
Ambigurity file : ./revTAIR10.fa-GtoA.amb
Packed DNA file : ./revTAIR10.fa-GtoA.pac
BWT Code file : ./revTAIR10.fa-GtoA.bwt
BWT Occ value file : ./revTAIR10.fa-GtoA.fmv
SA value file : ./revTAIR10.fa-GtoA.sa
Cached SA index file : ./revTAIR10.fa-GtoA.sai

Parsing FASTA file..
Finished. Parsed 1 sequences.
Elapsed time = 1.69 s

Building BWT..
10 iterations done. 29216502 characters processed.
20 iterations done. 51116198 characters processed.
30 iterations done. 68388198 characters processed.
40 iterations done. 82009526 characters processed.
50 iterations done. 92751014 characters processed.
60 iterations done. 101220726 characters processed.
70 iterations done. 107898326 characters processed.
80 iterations done. 113162150 characters processed.
90 iterations done. 117310742 characters processed.
Finished constructing BWT in 97 iterations. Elapsed time = 23.11 s

Saving BWT..
Finished saving BWT. Elapsed time = 0.03 s

Loading BWT...
Finished loading BWT. Elapsed time = 0.08 s

Building SA value...
SA Value generated : 1495846
SA Value generated : 2991692
SA Value generated : 4487538
SA Value generated : 5983384
SA Value generated : 7479230
SA Value generated : 8975076
SA Value generated : 10470922
SA Value generated : 11966768
SA Value generated : 13462614
SA Value generated : 14958460
SA Value generated : 14958469
Finished building SA value. Elapsed time = 8.11 s

Building cached SA index...
Finished building cached SA index. Elapsed time = 0.18 s

Finished all tasks. Total elapsed time = 33.19 s

Maximum amount of memory allocated: 162987932
Maximum amount of memory dispatched: 161182768
Number of char : 119667750
Bit per char : 10.78

Creating FM index of the genome...
BWTFormatdb v1.0, Copyright (C) 2006, Wong Chi Kwong.
BWTFormatdb comes with ABSOLUTELY NO WARRENTY.
BWTFormatdb is free software, and you are welcome to
redistribute it under certain conditions.
For details type BWTFormatdb.

Loading /gss1/home/daijie20171011/biosoft/BatMeth2/bin/bwtformatdb.ini ..done.

Parse FASTA file : Y
Build BWT : Y
Build SA value : Y
Build SA index : Y

Show progress : Y

Parse FASTA :
Mask lower case : N
Random seed : 1567503321

Build BWT :
Target N Bits : 2.50
Occ value frequency : 256
Initial Max Build Size : 10000000 Inc Max Build Size : 10000000

Build SA value :
SA value frequency : 8

Build SA index :
SA index no. of char : 12

Annotation file : TAIR10.fa-GtoA.non.ann
Ambigurity file : TAIR10.fa-GtoA.non.amb
Packed DNA file : TAIR10.fa-GtoA.non.pac
BWT Code file : TAIR10.fa-GtoA.non.bwt
BWT Occ value file : TAIR10.fa-GtoA.non.fmv
SA value file : TAIR10.fa-GtoA.non.sa
Cached SA index file : TAIR10.fa-GtoA.non.sai

Parsing FASTA file..
Finished. Parsed 7 sequences.
Elapsed time = 2.07 s

Building BWT..
10 iterations done. 29586359 characters processed.
20 iterations done. 51763335 characters processed.
30 iterations done. 69254039 characters processed.
40 iterations done. 83047927 characters processed.
50 iterations done. 93925543 characters processed.
60 iterations done. 102502631 characters processed.
70 iterations done. 109264919 characters processed.
80 iterations done. 114595543 characters processed.
90 iterations done. 118796855 characters processed.
Finished constructing BWT in 97 iterations. Elapsed time = 24.35 s

Saving BWT..
Finished saving BWT. Elapsed time = 0.02 s

Loading BWT...
Finished loading BWT. Elapsed time = 0.08 s

Building SA value...
SA Value generated : 1514781
SA Value generated : 3029562
SA Value generated : 4544343
SA Value generated : 6059124
SA Value generated : 7573905
SA Value generated : 9088686
SA Value generated : 10603467
SA Value generated : 12118248
SA Value generated : 13633029
SA Value generated : 15147810
SA Value generated : 15147817
Finished building SA value. Elapsed time = 8.23 s

Building cached SA index...
Finished building cached SA index. Elapsed time = 0.27 s

Finished all tasks. Total elapsed time = 35.02 s

Maximum amount of memory allocated: 164171740
Maximum amount of memory dispatched: 162366960
Number of char : 121182535
Bit per char : 10.72

Deleting auxilliary files...
FM index load error
-= Index Builder for Batman =-
Building on /gss1/home/daijie20171011/batmeth2/index
Stripping TAIR10.fa and filtering nucleotides...
Creating FASTA file of Reverse of the Genome...
Creating FM index of reverse genome...
BWTFormatdb v1.0, Copyright (C) 2006, Wong Chi Kwong.
BWTFormatdb comes with ABSOLUTELY NO WARRENTY.
BWTFormatdb is free software, and you are welcome to
redistribute it under certain conditions.
For details type BWTFormatdb.

Loading /gss1/home/daijie20171011/biosoft/BatMeth2/bin/bwtformatdb.ini ..done.

Parse FASTA file : Y
Build BWT : Y
Build SA value : Y
Build SA index : Y

Show progress : Y

Parse FASTA :
Mask lower case : N
Random seed : 1567503359

Build BWT :
Target N Bits : 2.50
Occ value frequency : 256
Initial Max Build Size : 10000000 Inc Max Build Size : 10000000

Build SA value :
SA value frequency : 8

Build SA index :
SA index no. of char : 12

Annotation file : ./revTAIR10.fa.ann
Ambigurity file : ./revTAIR10.fa.amb
Packed DNA file : ./revTAIR10.fa.pac
BWT Code file : ./revTAIR10.fa.bwt
BWT Occ value file : ./revTAIR10.fa.fmv
SA value file : ./revTAIR10.fa.sa
Cached SA index file : ./revTAIR10.fa.sai

Parsing FASTA file..
Finished. Parsed 1 sequences.
Elapsed time = 2.34 s

Building BWT..
10 iterations done. 29216502 characters processed.
20 iterations done. 51116198 characters processed.
30 iterations done. 68388198 characters processed.
40 iterations done. 82009526 characters processed.
50 iterations done. 92751014 characters processed.
60 iterations done. 101220726 characters processed.
70 iterations done. 107898326 characters processed.
80 iterations done. 113162150 characters processed.
90 iterations done. 117310742 characters processed.
Finished constructing BWT in 97 iterations. Elapsed time = 25.03 s

Saving BWT..
Finished saving BWT. Elapsed time = 0.02 s

Loading BWT...
Finished loading BWT. Elapsed time = 0.12 s

Building SA value...
SA Value generated : 1495846
SA Value generated : 2991692
SA Value generated : 4487538
SA Value generated : 5983384
SA Value generated : 7479230
SA Value generated : 8975076
SA Value generated : 10470922
SA Value generated : 11966768
SA Value generated : 13462614
SA Value generated : 14958460
SA Value generated : 14958469
Finished building SA value. Elapsed time = 10.90 s

Building cached SA index...
Finished building cached SA index. Elapsed time = 1.88 s

Finished all tasks. Total elapsed time = 40.29 s

Maximum amount of memory allocated: 162987932
Maximum amount of memory dispatched: 161182768
Number of char : 119667750
Bit per char : 10.78

Creating FM index of the genome...
BWTFormatdb v1.0, Copyright (C) 2006, Wong Chi Kwong.
BWTFormatdb comes with ABSOLUTELY NO WARRENTY.
BWTFormatdb is free software, and you are welcome to
redistribute it under certain conditions.
For details type BWTFormatdb.

Loading /gss1/home/daijie20171011/biosoft/BatMeth2/bin/bwtformatdb.ini ..done.

Parse FASTA file : Y
Build BWT : Y
Build SA value : Y
Build SA index : Y

Show progress : Y

Parse FASTA :
Mask lower case : N
Random seed : 1567503399

Build BWT :
Target N Bits : 2.50
Occ value frequency : 256
Initial Max Build Size : 10000000 Inc Max Build Size : 10000000

Build SA value :
SA value frequency : 8

Build SA index :
SA index no. of char : 12

Annotation file : TAIR10.fa.non.ann
Ambigurity file : TAIR10.fa.non.amb
Packed DNA file : TAIR10.fa.non.pac
BWT Code file : TAIR10.fa.non.bwt
BWT Occ value file : TAIR10.fa.non.fmv
SA value file : TAIR10.fa.non.sa
Cached SA index file : TAIR10.fa.non.sai

Parsing FASTA file..
Finished. Parsed 7 sequences.
Elapsed time = 1.94 s

Building BWT..
10 iterations done. 29586359 characters processed.
20 iterations done. 51763335 characters processed.
30 iterations done. 69254039 characters processed.
40 iterations done. 83047927 characters processed.
50 iterations done. 93925543 characters processed.
60 iterations done. 102502631 characters processed.
70 iterations done. 109264919 characters processed.
80 iterations done. 114595543 characters processed.
90 iterations done. 118796855 characters processed.
Finished constructing BWT in 97 iterations. Elapsed time = 27.18 s

Saving BWT..
Finished saving BWT. Elapsed time = 0.02 s

Loading BWT...
Finished loading BWT. Elapsed time = 0.06 s

Building SA value...
SA Value generated : 1514781
SA Value generated : 3029562
SA Value generated : 4544343
SA Value generated : 6059124
SA Value generated : 7573905
SA Value generated : 9088686
SA Value generated : 10603467
SA Value generated : 12118248
SA Value generated : 13633029
SA Value generated : 15147810
SA Value generated : 15147817
Finished building SA value. Elapsed time = 8.14 s

Building cached SA index...
Finished building cached SA index. Elapsed time = 1.83 s

Finished all tasks. Total elapsed time = 39.18 s

Maximum amount of memory allocated: 164171740
Maximum amount of memory dispatched: 162366960
Number of char : 121182535
Bit per char : 10.72

Deleting auxilliary files...
FM index load error

read extraction before calmeth

Dear Dr. Zhou,

Thank you for creating such an excellent tool.

Recently, I downloaded the methylation data from one published study. And I want to repeat the results from some analysis of this study by following their pipeline. Two main parts of the pipeline are: first, mapping reads to reference genome by Bismark; second, methylated cytosine calling using BatMeth2. However, my results (like methylation level of gene body) were quite different from those from the study.

Then I check the scripts for each step of the pipeline. Due to the large deduplicated bam filesgenerated by Bismark, I wanted to speed up the following methylated cytosine calling, so I used samtools to extract reads that aligned to different chromosomes/scaffolds, respectively (for example, one of command line is like: samtools view XXX_1_bismark_bt2_pe.deduplicated.sorted.bam chr1 > chr1_extracted.bam). Then I used calmeth in Batmeth2 for each extracted bam file to calculate methylation level.

I don’t know whether read extraction before calculating methylation level could have an influence on the downstream analysis. And I once used the bam file generated by Bismark directly to calculate methylation level, maybe due to the large size, it failed.
The authors did not provide more detailed information for methylated cytosine calling using BatMeth2 in their study. Can you give me some suggestions for this problem that confused me for a long time? Thanks in advance for the help.

RuiH

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.