Skip to content

Commit

Permalink
[MISC] Create conda samtools environment
Browse files Browse the repository at this point in the history
Signed-off-by: Lydia Buntrock <[email protected]>
  • Loading branch information
Irallia committed Oct 26, 2022
1 parent c850899 commit 91dad04
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,7 @@ rule picard:
vcf = "results/caller_comparison_iGenVar_only/{input_combination}/variants.vcf"
log:
"logs/caller_comparison_iGenVar_only/picard_output.{input_combination}.log"
conda:
"../../../envs/simulation.yaml"
shell:
"picard SortVcf -I {input.vcf} -O {output.vcf} -Xms1g -Xmx100g --TMP_DIR tmp/picard/ &>> {log}"
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ rule picard:
vcf = "results/caller_comparison_long_read/{dataset}/SVIM/variants.vcf"
log:
"logs/caller_comparison_long_read/SVIM/picard_output.{dataset}.log"
conda:
"../../../envs/simulation.yaml"
shell:
"picard SortVcf -I {input.vcf} -O {output.vcf} -Xms1g -Xmx100g --TMP_DIR tmp/picard/ &>> {log}"
# The Xms and Xmx sets the java memory for avoiding "java.lang.OutOfMemoryError: GC overhead limit exceeded"
Expand Down
2 changes: 0 additions & 2 deletions test/benchmark/envs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ channels:
- conda-forge
- bioconda
dependencies:
# - bedops # for vcf2bed
- bgzip # rule tabix - accepts only zipped files zipped with bgzip
- crossmap # for coordinate_conversion.sh
- delly=1.0.3
# - lumpy-sv=0.3.1 # rule run_Lumpy
- mamba
- matplotlib # rule run_svim
- pbsv=2.6.2
- picard # rule picard
- pip
- python=3.6
- r
Expand Down
5 changes: 3 additions & 2 deletions test/benchmark/envs/samtools.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: samtools
channels:
- bioconda
#Sorting BAM files from NGMLR fails in samtools version>=1.10, therefore fix to version 1.9
# Sorting BAM files from NGMLR fails in samtools version>=1.10, therefore fix to version 1.9
dependencies:
- samtools=1.9
- samtools #=1.9
10 changes: 10 additions & 0 deletions test/benchmark/envs/simulation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: simulation
channels:
- defaults
- conda-forge
- bioconda
dependencies:
- bwa>=0.7 # for aligning the simulated reads
- mamba
- mason # for simulation Illumina short reads
- picard # for sorting vcf files
5 changes: 4 additions & 1 deletion test/benchmark/prepare_BAM_with_crossmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ wget --retry-connrefused --waitretry=30 --read-timeout=30 --timeout=30 --tries=2

echo "$(tput setaf 1)$(tput setab 7)------- CrossMap installed and prepared (5.1/9.6) --------$(tput sgr 0)" 1>&3

conda env create -f Repos/iGenVar/test/benchmark/envs/samtools.yaml
conda activate samtools

# Illumina Mate Pair
## prepare reference file:
## reorder reference:
Expand Down Expand Up @@ -78,6 +81,6 @@ CrossMap.py bam hg19ToHg38.over.chain.gz long_reads/GRCh37/NA24385_phased_possor
long_reads/GRCh38/NA24385_phased_possorted_bam.Hg38.bam
CrossMap.py bam hg19ToHg38.over.chain.gz long_reads/GRCh37/NA24385_phased_possorted_bam.md.bam \
long_reads/GRCh38/NA24385_phased_possorted_bam.md.Hg38.bam
conda activate benchmarks
conda activate iGenVar_benchmark

echo "$(tput setaf 1)$(tput setab 7)------- BAM files prepared (5.3/9.6) --------$(tput sgr 0)" 1>&3
2 changes: 0 additions & 2 deletions test/benchmark/prepare_truth_set_with_NCBI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,4 @@ CrossMap.py bed hg19ToHg38.over.chain.gz truth_set/${TRUTH_SET}.renamed_chr.bed
# remove chr from chromosome names again
sed -e 's!chr!!' truth_set/${TRUTH_SET}.renamed_chr.Hg38.bed > truth_set/${TRUTH_SET}.Hg38.bed

# convert2bed --input=vcf --insertions < NA24385.GRCh38.large_svs.vcf.gz > insertions.bed

echo "$(tput setaf 1)$(tput setab 7)------- truth set files prepared (5.6/9.6) --------$(tput sgr 0)" 1>&3

0 comments on commit 91dad04

Please sign in to comment.