Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions build-tools/downloadMafTools
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,6 @@ fi

# taffy
cd ${mafBuildDir}
wget -q https://github.com/samtools/samtools/releases/download/1.11/samtools-1.11.tar.bz2
tar --no-same-owner -xf samtools-1.11.tar.bz2
cd samtools-1.11
SAMTOOLS_CONFIG_OPTS=""
if [[ $STATIC_CHECK -eq 1 ]]
then
SAMTOOLS_CONFIG_OPTS="--disable-shared --enable-static"
fi
./configure --without-curses --disable-libcurl --enable-configure-htslib $SAMTOOLS_CONFIG_OPTS
make -j ${numcpu}
cd htslib-1.11
make -j ${numcpu} libhts.a
export HTSLIB_CFLAGS=-I$(pwd)
export HTSLIB_LIBS="$(pwd)/libhts.a -lbz2 -ldeflate -lm -lpthread -lz -llzma -pthread -lpthread"
cd ${mafBuildDir}
git clone https://github.com/ComparativeGenomicsToolkit/taffy.git
cd taffy
git checkout 1329d999948ad4acc10116276fa7a9752a749595
Expand Down
14 changes: 7 additions & 7 deletions build-tools/downloadPangenomeTools
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ fi

#samtools
cd ${pangenomeBuildDir}
wget -q https://github.com/samtools/samtools/releases/download/1.11/samtools-1.11.tar.bz2
tar --no-same-owner -xf samtools-1.11.tar.bz2
cd samtools-1.11
wget -q https://github.com/samtools/samtools/releases/download/1.22.1/samtools-1.22.1.tar.bz2
tar --no-same-owner -xf samtools-1.22.1.tar.bz2
cd samtools-1.22.1
SAMTOOLS_CONFIG_OPTS=""
if [[ $STATIC_CHECK -eq 1 ]]
then
Expand All @@ -105,7 +105,7 @@ then
else
exit 1
fi
cd htslib-1.11
cd htslib-1.22.1
make -j ${numcpu} tabix
make -j ${numcpu} bgzip
if [[ $STATIC_CHECK -ne 1 || $(ldd tabix | grep so | wc -l) -eq 0 ]]
Expand All @@ -123,9 +123,9 @@ fi

#bcftools
cd ${pangenomeBuildDir}
wget -q https://github.com/samtools/bcftools/releases/download/1.19/bcftools-1.19.tar.bz2
tar --no-same-owner -xf bcftools-1.19.tar.bz2
cd bcftools-1.19
wget -q https://github.com/samtools/bcftools/releases/download/1.22/bcftools-1.22.tar.bz2
tar --no-same-owner -xf bcftools-1.22.tar.bz2
cd bcftools-1.22
SAMTOOLS_CONFIG_OPTS=""
if [[ $STATIC_CHECK -eq 1 ]]
then
Expand Down
11 changes: 3 additions & 8 deletions src/cactus/refmap/cactus_graphmap_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,15 +1213,13 @@ def vcfnorm(job, config, vcf_ref, vcf_id, vcf_path, tbi_id, fasta_ref_dict):
job.fileStore.readGlobalFile(fasta_ref_dict[vcf_ref], fa_ref_path)

norm_path = os.path.join(work_dir, 'norm.' + os.path.basename(vcf_path))
cactus_call(parameters=['bcftools', 'view', '-h', '-Oz', vcf_path], outfile=norm_path)
view_cmd = ['bcftools', 'view', '-H']
view_cmd = ['bcftools', 'view']
if getOptionalAttrib(findRequiredNode(config.xmlRoot, "graphmap_join"), "filterAC0", typeFn=bool, default=False):
view_cmd += ['-e', 'AC=0']
cactus_call(parameters=[['bcftools', 'norm', '-m', '-any', vcf_path],
['bcftools', 'norm', '-f', fa_ref_path],
view_cmd,
['sort', '-k1,1d', '-k2,2n', '-s', '-T', work_dir],
['bgzip']], outfile=norm_path, outappend=True)
['bcftools', 'sort', '-Oz', '-T', work_dir]], outfile=norm_path)
merge_duplicates_opts = getOptionalAttrib(findRequiredNode(config.xmlRoot, "graphmap_join"), "mergeDuplicatesOptions", typeFn=str, default=None)
if merge_duplicates_opts not in [None, "0"]:
#note: merge_duplcates complains about not having a .tbi but I don't think it actually affects anything
Expand Down Expand Up @@ -1493,10 +1491,7 @@ def vcf_cat(job, vcf_tbi_ids, tag, sort=False, fix_ploidies=True):
# stable sort, which is apparently not guaranteed by bcftools sort
# (this could be useful for merge_duplicates.py)
sort_vcf_path = os.path.join(work_dir, '{}sort.vcf.gz'.format(tag))
cactus_call(parameters=['bcftools', 'view', '-Oz', '-h', cat_vcf_path], outfile=sort_vcf_path)
cactus_call(parameters=[['bcftools', 'view', '-H', cat_vcf_path],
['sort', '-k1,1d', '-k2,2n', '-s', '-T', work_dir],
['bgzip']], outfile=sort_vcf_path, outappend=True)
cactus_call(parameters=['bcftools', 'sort', '-Oz', '-T', work_dir, cat_vcf_path], outfile=sort_vcf_path)
cat_vcf_path = sort_vcf_path

if fix_ploidies:
Expand Down