diff --git a/tools/halfdeep/halfdeep.xml b/tools/halfdeep/halfdeep.xml index 2d410223564..be55c582957 100644 --- a/tools/halfdeep/halfdeep.xml +++ b/tools/halfdeep/halfdeep.xml @@ -9,37 +9,35 @@ ## Set up the directory structure expected by bam_depth.sh and halfdeep.sh ## See: https://github.com/makovalab-psu/HalfDeep?tab=readme-ov-file#expected-directory-layout ## - #import re + mkdir -p reads halfdeep/ref/mapped_reads && ## ## reference ## ln -s '$ref' 'ref.$ref.ext' && - touch ref.idx && + #if not $mapped_reads + minimap2 -x map-pb -d ref.idx 'ref.$ref.ext' && + #else + touch ref.idx && + #end if ## ## reads ## - #set $reads_dir = "reads" - #set $mapped_reads_dir = "halfdeep/ref/mapped_reads" - mkdir -p '$reads_dir' '$mapped_reads_dir' && - #for $read in $reads - #set $read_base = re.sub('[^\w\-\s]', '_', str($read.element_identifier)) - ln -s '$read' '$reads_dir/${read_base}.$read.ext' && - echo '$reads_dir/${read_base}.$read.ext' >> input.fofn && - ## - ## mapped reads - ## - #for $mapped_read in $mapped_reads - ln -s '$mapped_read' "$mapped_reads_dir/${read_base}.bam" && - ln -s "${read_base}.bam" "$mapped_reads_dir/${read_base}.sort.bam" && - ln -s '$mapped_read.metadata.bam_index' "$mapped_reads_dir/${read_base}.sort.bam.bai" && - #end for - #end for + #import re + #set $reads_base = re.sub('[^\w\-\s]', '_', str($reads.element_identifier)) + ln -s '$reads' 'reads/${reads_base}.$reads.ext' && + echo 'reads/${reads_base}.$reads.ext' >> input.fofn && + ## + ## mapped reads + ## + #if $mapped_reads + ln -s '$mapped_reads' 'halfdeep/ref/mapped_reads/${reads_base}.bam' && + ln -s '${reads_base}.bam' 'halfdeep/ref/mapped_reads/${reads_base}.sort.bam' && + ln -s '$mapped_reads.metadata.bam_index' 'halfdeep/ref/mapped_reads/${reads_base}.sort.bam.bai' && + #end if ## ## run bam_depth.sh ## - #for $line_number in range(1, len($reads) + 1) - bam_depth.sh 'ref.$ref.ext' $line_number && - #end for + bam_depth.sh 'ref.$ref.ext' 1 && ## ## run halfdeep.sh ## @@ -47,23 +45,22 @@ ]]> - - + + - - - - + - - - + + + + + @@ -71,11 +68,11 @@ HalfDeep identifies genomic regions with half-depth coverage based on sequencing read mappings. These regions may reveal insights into heterogametic sex chromosomes, haplotype-specific variation, or potential assembly errors such as heterotypic duplications. -Given the following three inputs: +Given the following inputs: 1. A genome assembly in FASTA format. 2. Reads in FASTQ format. -3. Mapped reads in BAM format +3. Mapped reads in BAM format (optional) HalfDeep automates the following tasks: @@ -83,14 +80,11 @@ HalfDeep automates the following tasks: 2. Calculating per-base read depth. 3. Smoothing read coverage using a defined window with genodsp. 4. Determining the percentile of read coverage. -5. Identifying genomic regions with half-depth coverage based on a specified percentile threshold (e.g., 40–60%) and exporting them in BED file forma +5. Identifying genomic regions with half-depth coverage based on a specified percentile threshold (e.g., 40–60%) and exporting them in BED file format -HalfDeep produces the following outputs: +HalfDeep produces the following output: -1. Scaffold lengths: A tabular file containing the name and legth of each sequence in the genome assembly. -2. Depths: A tabular file containing the read depts. -3. A tabular file containing the name and legth of each sequence in the genome assembly: stuff -4. HalfDeep: BED file containina regions of the genome assembly that are "covered at half depth" +1. HalfDeep: BED file containing regions of the genome assembly that are "covered at half depth" ]]> diff --git a/tools/halfdeep/test-data/depth.tabular.gz b/tools/halfdeep/test-data/depth.tabular.gz deleted file mode 100644 index 9d7edfed841..00000000000 Binary files a/tools/halfdeep/test-data/depth.tabular.gz and /dev/null differ diff --git a/tools/halfdeep/test-data/percentile.txt b/tools/halfdeep/test-data/percentile.txt deleted file mode 100644 index 6bc9e16a101..00000000000 --- a/tools/halfdeep/test-data/percentile.txt +++ /dev/null @@ -1,6 +0,0 @@ -export percentile40=0.975 -export percentile50=0.986 -export percentile60=1.331 -export halfPercentile40=0.4875 -export halfPercentile50=0.493 -export halfPercentile60=0.6655 diff --git a/tools/halfdeep/test-data/scaffold_lengths.tabular b/tools/halfdeep/test-data/scaffold_lengths.tabular deleted file mode 100644 index 151e87d25f8..00000000000 --- a/tools/halfdeep/test-data/scaffold_lengths.tabular +++ /dev/null @@ -1,3 +0,0 @@ -FAKE1 482501 -FAKE2 366529 -FAKE3 150970