From 7acbb6739407e5be4d6a2579540885f3a5d55b87 Mon Sep 17 00:00:00 2001 From: "Richard C. Burhans" Date: Wed, 4 Dec 2024 15:24:53 -0500 Subject: [PATCH] modifgy so it only takes one reads file and at most on mapped reads file --- tools/halfdeep/halfdeep.xml | 70 ++++++++---------- tools/halfdeep/test-data/depth.tabular.gz | Bin 4876 -> 0 bytes tools/halfdeep/test-data/percentile.txt | 6 -- .../test-data/scaffold_lengths.tabular | 3 - 4 files changed, 32 insertions(+), 47 deletions(-) delete mode 100644 tools/halfdeep/test-data/depth.tabular.gz delete mode 100644 tools/halfdeep/test-data/percentile.txt delete mode 100644 tools/halfdeep/test-data/scaffold_lengths.tabular 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 9d7edfed8415d4580c7c7309e2d5829566033849..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4876 zcmV+n6Z7mJiwFP!0000019e~Fbu^D=|-nu%z zKlzc~thcR>hThV}di(0==*`V#7^`F0+e!|3lmDIXlj{9gh_6J7_kZ%*-zPQx{*&1L z&Xv1_88VyXz4$6Kq;9?<$^*H(umAP_Px9>YC!b$FNyN1{d>;8E5!YjLJ<2Bu{?6Z1 zJNo@n?f0QI{eGz?e^!@AKgreP@7xjnBv+Ha7vGce%~0&Ut++nRHv|6ea+Ys~V!N2C zzqfoED8u#Rwp8A)|3$x04=tIAeEp;Nezk9B+mEHT&q|xwYRWE8`y_8Bza;j<1WgZb zB)>4c9LBWm^_8+dOt~C*QfeEzMlqO+sBq%|L^z4x8Hhxzc;?a_r>LZzc;?` zeg4-8O>E{0geS}nT`spL$#(2={W(o`@UqEUh3C%>nx8buF#=^+^Hik-0@={WletS- z;6~8MlLq~W2u8#-Eb$DSi=XK{xE_HyiTgH*5lC&#Txq-q;#%``bxT}6EU}q;5WY_# zl=>-%T~Kp>ZeQWI;5xi{GA${a^Kc*XR_e{%2O4?$OC7+0STi*m`=eMQ8kzee9KjON z$UIw=x+Hhb&~*;4js3CaX^na-(1A722-_*pK~eW{jD5v|0HaqtgT)uuL62vkgJL>( zOUMQtxDV8@Yq&peo*GdF4$vBTYNd867H`emZQ4P_;;Y$cE%6K%k7n-AHXC$+MxXRX zyn_zVtX+urSSYm9IBJYQ2etWbbLT1+U(F6m<4P+QU(F8c7IC42N;{yg5eB@O(S}xq zK;X@cf7}Ix0&kugC#yjRXv&jPJOdpx)4}^j)Q1i{jx@%R-0|w3-6PRLADp=^=>jgtGS8fX;elpLkh!V#ELVmuU%z?_mJ zjK&dwL~*RxX^D~{TjtJDY5+)UrjL*JAS8(+!}eB=Kx#BP_mtW}u<~Z2+js_2d(7&C zBNnVYW~D(1ELd6Sn(v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-MjuUdkI-{L)IEkUXA%vmweT0C=A4A3i|6$8s& zDfLk?5Vr#TsTgoxQ!kD`Z7ApF_`}Xmj(>U};>Pp4{lpp!{pI)>g-?z@^G>TjU+0g( zl^z^_aJzbaou66fq(AJxjCjw<@p}!1{&4((kWY?3@%EuV9KVF#4vt@0A*~n3zfNO} y>>R(&8znV*aQw;~zFr*vVy)tto#S8D8|yha{y?24$G_Oi`qzKs4y08^M*skSh32{d 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