-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Richard C. Burhans
committed
Nov 27, 2024
1 parent
4145612
commit ee04f9f
Showing
5 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<tool id="halfdeep" name="HalfDeep" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | ||
<description>Automated detection of intervals covered at half depth by sequenced reads.</description> | ||
<macros> | ||
<import>macros.xml</import> | ||
</macros> | ||
<expand macro="requirements"/> | ||
<command detect_errors="exit_code"><![CDATA[ | ||
#import os | ||
## | ||
## reference | ||
## | ||
reference_filename="ref.fasta" && | ||
if [ "\$(head -c 2 '$ref' | xxd -p)" = "1f8b" ]; then reference_filename="ref.fasta.gz"; fi && | ||
ln -s '$ref' "\$reference_filename" && | ||
touch ref.idx && | ||
## | ||
## 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 $seq_base = os.path.basename(str($read)) | ||
ln -s '$read' '$reads_dir/$seq_base' && | ||
echo '$reads_dir/$seq_base' >> input.fofn && | ||
## | ||
## mapped reads | ||
## | ||
#for $mapped_read in $mapped_reads | ||
ln -s '$mapped_read' "$mapped_reads_dir/${seq_base}.bam" && | ||
ln -s "${seq_base}.bam" "$mapped_reads_dir/${seq_base}.sort.bam" && | ||
ln -s '$mapped_read.metadata.bam_index' "$mapped_reads_dir/${seq_base}.sort.bam.bai" && | ||
#end for | ||
#end for | ||
## | ||
## run bam_depth.sh | ||
## | ||
#for $line_number in range(1, len($reads) + 1) | ||
bam_depth.sh "\$reference_filename" $line_number && | ||
#end for | ||
## | ||
## run halfdeep.sh | ||
## | ||
halfdeep.sh "\$reference_filename" | ||
]]></command> | ||
<inputs> | ||
<param name="ref" type="data" format="fasta,fasta.gz" label="Genome Assembly" help="A Genome Assembly in FASTA format."/> | ||
<param name="reads" type="data" format="fastqsanger,fastqsanger.gz" multiple="true" label="Sequencing Reads" help="Sequencing Reads for the Genome Assembly in FASTQ format."/> | ||
<param name="mapped_reads" type="data" format="bam" multiple="true" label="Aligned Reads" help="Alignments of the Sequencing Reads to the Genome Assembly in BAM format."/> | ||
</inputs> | ||
<outputs> | ||
<data name="scaffold_len" format="tabular" from_work_dir="halfdeep/ref/scaffold_lengths.dat" label="Scaffold lengths for ${on_string}"/> | ||
<data name="depth_dat" format="tabular.gz" from_work_dir="halfdeep/ref/depth.dat.gz" label="Depth for ${on_string}"/> | ||
<data name="pct_cmds" format="text" from_work_dir="halfdeep/ref/percentile_commands.sh" label="Percentile to value for ${on_string}"/> | ||
<data name="halfdeep_dat" format="tabular" from_work_dir="halfdeep/ref/halfdeep.dat" label="HalfDeep on ${on_string}"/> | ||
</outputs> | ||
<tests> | ||
<test expect_num_outputs="4"> | ||
<param name="ref" value="ref.fasta.gz" ftype="fasta.gz"/> | ||
<param name="reads" value="reads.fasta.gz" ftype="fasta.gz"/> | ||
<param name="mapped_reads" value="mapped_reads.bam" ftype="bam"/> | ||
</test> | ||
</tests> | ||
<help><![CDATA[ | ||
Inputs are an assembly in FASTA format, reads in FASTQ format, and mapped reads in BAM format. | ||
The final output is a halfdeep.dat file. This is a list of intervals (origin 1, closed) that the process has called as 'covered at half depth'. | ||
]]></help> | ||
<expand macro="citations"/> | ||
</tool> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<macros> | ||
<xml name="requirements"> | ||
<requirements> | ||
<requirement type="package" version="@TOOL_VERSION@">halfdeep</requirement> | ||
</requirements> | ||
</xml> | ||
<token name="@TOOL_VERSION@">0.1.0</token> | ||
<token name="@VERSION_SUFFIX@">0</token> | ||
<token name="@PROFILE@">21.05</token> | ||
<xml name="citations"> | ||
<citations> | ||
<citation type="bibtex"> | ||
@misc{github_halfdeep, | ||
author = {Makova Lab PSU}, | ||
year = "2019", | ||
title = {HalfDeep}, | ||
publisher = {GitHub}, | ||
journal = {GitHub repository}, | ||
url = {https://github.com/makovalab-psu/HalfDeep} | ||
</citation> | ||
</citations> | ||
</xml> | ||
</macros> |
Binary file not shown.
Binary file not shown.
Binary file not shown.