Question: How to access a genome fasta index (FAI) build with data_manager_sam_fasta_index_builder (by devteam)
0
gravatar for christian.rausch
2.7 years ago by
christian.rausch • 0 wrote:

I am modifying a galaxy tool (in testtoolshed: falco) that should have access to samtools fasta indices of reference genomes.

Currently, in the tool's xml file: REF_FILE="${genomeSource.indices.fields.path}" is called.

But this links to /home/galaxy/galaxy/tool-data/hg19/seq in case hg19 is selected. I rather want it to look in: /home/galaxy/galaxy/tool-data/hg19/sam_indexes/hg19

What are the galaxy-internal variables to build up the path to this location?

Thanks, Christian

ADD COMMENT • link • modified 2.7 years ago by Jennifer Hillman Jackson ♦ 25k • written 2.7 years ago by christian.rausch • 0
0
gravatar for Jennifer Hillman Jackson
2.7 years ago by
United States
Jennifer Hillman Jackson ♦ 25k wrote:

Hello,

Review existing tools that access this index for examples. Sam-to-Bam is one and can be found in the tool shed. View the repository tip files for a quick view. Here is the top for this tool's XML:

<tool id="sam_to_bam" name="SAM-to-BAM" version="2.1">
  <description>convert SAM to BAM</description>
  <macros>
    <import>macros.xml</import>
  </macros>
  <expand macro="requirements"></expand>
  <expand macro="stdio"></expand>
  <expand macro="version_command"></expand>
  <command>
    <![CDATA[
        #if $source.index_source == "history":
          ln -s $source.ref_file input.fa &&
          samtools faidx input.fa &&
        #else
          ln -s ${source.index.fields.path} input.fa &&
          ln -s ${source.index.fields.path}.fai input.fa.fai &&
        #end if
        samtools view -b -@ \${GALAXY_SLOTS:-1} -t input.fa.fai "$input1" | samtools sort -O bam -@ \${GALAXY_SLOTS:-1} -o "$output1" -T temp
    ]]>
    </command>

Thanks, Jen, Galaxy team

ADD COMMENT • link written 2.7 years ago by Jennifer Hillman Jackson ♦ 25k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 181 users visited in the last hour