0
$\begingroup$

I included a new tool in galaxy and I get the following debug msg:

galaxy.metadata DEBUG ... setting metadata externally failed for HistoryDatasetAssociation 860: 'samtools returned with error 1: stdout=, stderr=samtools index: failed to create index for ".../galaxy/database/files/000/dataset_859.dat"\n'.

since

[E::hts_idx_push] Unsorted positions on sequence #1: 205803679 followed by 25375294

These numbers appear to be from the output bam of my tool.

I fixed this by adding: samtools sort output.bam > a && mv a output.bam in the last line of CDATA section.


Is there a elegant way of doing the same? For instance could dependency_resolvers_conf.xml have something to do?

Thank you

$\endgroup$
5
  • $\begingroup$ I actually overcame this adding a sorting to the output bam FROM the tool wrapped into galaxy. Nevertheless, I still have the doubt on how to deal with such issue if I am using someone else's tool that doesn't have the options or retrieving a sorted output bam file. $\endgroup$
    – aerijman
    May 14 '19 at 18:58
  • $\begingroup$ What version of galaxy are you using? There's an unsorted BAM datatype in recent versions. $\endgroup$
    – Devon Ryan
    May 15 '19 at 8:50
  • $\begingroup$ BTW, almost every aligner wrapper in Galaxy currently produces a sorted BAM file. $\endgroup$
    – Devon Ryan
    May 15 '19 at 8:51
  • $\begingroup$ @DevonRyan I am using the commit 8bc23e03e020a4199e9fa1c405b5f2fd50c39f09. A newer commit doesn't complain if output bam is not sorted? $\endgroup$
    – aerijman
    May 15 '19 at 15:20
  • $\begingroup$ I have no idea which actual version that is. I think they added an unsorted BAM data type in 2018. Of course the RSEM wrapper would also need to be changed to use it. $\endgroup$
    – Devon Ryan
    May 15 '19 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.