Skip to content

Commit

Permalink
Merge branch 'release_21.05' into release_21.09
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Sep 6, 2022
2 parents 52de57b + 8069584 commit 06baa27
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/galaxy/datatypes/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Interval(Tabular):
MetadataElement(name="chromCol", default=1, desc="Chrom column", param=metadata.ColumnParameter)
MetadataElement(name="startCol", default=2, desc="Start column", param=metadata.ColumnParameter)
MetadataElement(name="endCol", default=3, desc="End column", param=metadata.ColumnParameter)
MetadataElement(name="strandCol", desc="Strand column (click box & select)", param=metadata.ColumnParameter, optional=True, no_value=0)
MetadataElement(name="strandCol", default=0, desc="Strand column (click box & select)", param=metadata.ColumnParameter, optional=True, no_value=0)
MetadataElement(name="nameCol", desc="Name/Identifier column (click box & select)", param=metadata.ColumnParameter, optional=True, no_value=0)
MetadataElement(name="columns", default=3, desc="Number of columns", readonly=True, visible=False)

Expand Down Expand Up @@ -386,7 +386,7 @@ class Bed(Interval):
MetadataElement(name="chromCol", default=1, desc="Chrom column", param=metadata.ColumnParameter)
MetadataElement(name="startCol", default=2, desc="Start column", param=metadata.ColumnParameter)
MetadataElement(name="endCol", default=3, desc="End column", param=metadata.ColumnParameter)
MetadataElement(name="strandCol", desc="Strand column (click box & select)", param=metadata.ColumnParameter, optional=True, no_value=0)
MetadataElement(name="strandCol", default=0, desc="Strand column (click box & select)", param=metadata.ColumnParameter, optional=True, no_value=0)
MetadataElement(name="columns", default=3, desc="Number of columns", readonly=True, visible=False)
MetadataElement(name="viz_filter_cols", desc="Score column for visualization", default=[4], param=metadata.ColumnParameter, optional=True, multiple=True)
# do we need to repeat these? they are the same as should be inherited from interval type
Expand Down Expand Up @@ -567,7 +567,7 @@ class BedStrict(Bed):
MetadataElement(name="chromCol", default=1, desc="Chrom column", readonly=True, param=metadata.MetadataParameter)
MetadataElement(name="startCol", default=2, desc="Start column", readonly=True, param=metadata.MetadataParameter) # TODO: start and end should be able to be set to these or the proper thick[start/end]?
MetadataElement(name="endCol", default=3, desc="End column", readonly=True, param=metadata.MetadataParameter)
MetadataElement(name="strandCol", desc="Strand column (click box & select)", readonly=True, param=metadata.MetadataParameter, no_value=0, optional=True)
MetadataElement(name="strandCol", default=0, desc="Strand column (click box & select)", readonly=True, param=metadata.MetadataParameter, no_value=0, optional=True)
MetadataElement(name="nameCol", desc="Name/Identifier column (click box & select)", readonly=True, param=metadata.MetadataParameter, no_value=0, optional=True)
MetadataElement(name="columns", default=3, desc="Number of columns", readonly=True, visible=False)

Expand Down Expand Up @@ -1423,7 +1423,7 @@ class ENCODEPeak(Interval):
MetadataElement(name="chromCol", default=1, desc="Chrom column", param=metadata.ColumnParameter)
MetadataElement(name="startCol", default=2, desc="Start column", param=metadata.ColumnParameter)
MetadataElement(name="endCol", default=3, desc="End column", param=metadata.ColumnParameter)
MetadataElement(name="strandCol", desc="Strand column (click box & select)", param=metadata.ColumnParameter, optional=True, no_value=0)
MetadataElement(name="strandCol", default=0, desc="Strand column (click box & select)", param=metadata.ColumnParameter, optional=True, no_value=0)
MetadataElement(name="columns", default=3, desc="Number of columns", readonly=True, visible=False)

def sniff(self, filename):
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ def _repository_dir(self):
if getattr(self, 'tool_shed', None):
tool_dir = Path(self.tool_dir)
for repo_dir in itertools.chain([tool_dir], tool_dir.parents):
if repo_dir.name == self.repository_name:
if repo_dir.name == self.repository_name and repo_dir.parent.name == self.installed_changeset_revision:
return str(repo_dir)
else:
log.error(f"Problem finding repository dir for tool '{self.id}'")
Expand Down
28 changes: 28 additions & 0 deletions test/functional/tools/metadata_bed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<tool id="metadata_bed" name="BED metadata test" version="1.0.0">
<command>
<![CDATA[
echo "chromCol $input1.metadata.chromCol" > $out_file1 &&
echo "startCol $input1.metadata.startCol" >> $out_file1 &&
echo "endCol $input1.metadata.endCol" >> $out_file1 &&
echo "strandCol $input1.metadata.strandCol" >> $out_file1
]]>
</command>
<inputs>
<param format="interval" name="input1" type="data" label="Choose intervals"/>
</inputs>
<outputs>
<data format="txt" name="out_file1"/>
</outputs>
<tests>
<test>
<param name="input1" value="1.bed" ftype="bed"/>
<output name="out_file1">
<assert_contents>
<has_text text="strandCol 6"/>
</assert_contents>
</output>
</test>
</tests>
<help>
</help>
</tool>
1 change: 1 addition & 0 deletions test/functional/tools/samples_tool_conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<tool file="metadata.xml" />
<tool file="metadata_bam.xml" />
<tool file="metadata_bcf.xml" />
<tool file="metadata_bed.xml" />
<tool file="metadata_biom1.xml" />
<tool file="metadata_column_names.xml" />
<tool file="strict_shell.xml" />
Expand Down

0 comments on commit 06baa27

Please sign in to comment.