heathsc / gemBS-rs

A re-write of the gemBS pipeline framework in Rust
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

genome index is regenerated even if it already exists #11

Open bounlu opened 2 years ago

bounlu commented 2 years ago

gemBS index command regenerates the genome index even though it already exists as prepared in advance. It overwrites the existing file genome.gemBS.gem in the below settings.

The documentation says:

# Note that the index and contig_sizes files are generated from the
# reference file if they do not already exist

So I would expect the indexing would be skipped in my case. The rest of the commands gemBS map etc. work fine after the index is regenerated.

I am wondering what I am doing wrong or whether this is a bug?

My commands:

gemBS prepare -c gembsrs.config -t input.txt
gemBS index

My gembsrs.config file:

base = "/home"

index_dir = ${base}/reference
sequence_dir = ${base}/fastq
bam_dir = ${base}/mapping
bcf_dir = ${base}/calling
extract_dir = ${base}/extract
report_dir = ${base}/report

# hg38 genome index prepared in advance
reference = ${base}/reference/genome.fasta
index = ${base}/reference/genome.gemBS.gem

jobs = 8
cores = 32
threads = 64
memory = 256G

[dbsnp]

# dbsnp index prepared in advance
dbsnp_files = ${base}/reference/dbsnp_146.hg38.vcf.gz
dbsnp_index = ${base}/reference/dbsnp_146.hg38.gemBS.vcf.idx
dbsnp_type = "VCF"

[mapping]

non_stranded = False
remove_individual_bams = True

[calling]

jobs = 8
mapq_threshold = 10
qual_threshold = 13
reference_bias = 2
left_trim = 5
right_trim = 0
keep_improper_pairs = False
keep_duplicates = False
haploid = False
conversion = 0.01,0.05
remove_individual_bcfs = True
contig_pool_limit = 25000000

[extract]

jobs = 8
strand_specific = True
bigwig_strand_specific = True
phred_threshold = 10
make_cpg = True
make_non_cpg = True
make_bedmethyl = True
make_bigwig = True
make_snps = True

Log:


INFO - Launch:
    /usr/local/lib/gemBS/bin/gem-indexer -i ./reference/genome.gemBS.ref -o ./reference/genome.gemBS --bisulfite-index --threads 64 --tmp-folder ./reference