Question: Samtools error assoicated with multiple mapping tools
gravatar for gkuffel22
7 months ago by
United States
gkuffel22170 wrote:

Hoping for some help here.

I am having issues with several mapping tools that utilize samtools and I think I have finally identified some commonality between the errors. I will list the errors below. I suspect my issue is something with samtools, however if I look under "Mange Dependencies" all of these tools show the samtools dependency resolved by Conda and actually each mapper uses different versions of samtools. It seems all of the mappers are able to do their thing but after the mapping when the tool attempts to sort the output using samtools "sort" that is when the errors are thrown and the jobs cannot be completed. Help is greatly appreciated as I have several users waiting for me to fix this issue. Any ideas on this or perhaps a location in the file structure I can look at for more information?


Fatal error: Exit code 139 ()
sort: invalid option -- '@'
sort: invalid option -- 'l'
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[bam_sort_core] truncated file. Continue anyway.
(ERR): hisat2-align died with signal 13 (PIPE) 
/data/galaxy/galaxy/database/jobs_directory/000/86/ line 41:  8799 Exit 1                  hisat2 -p ${GALAXY_SLOTS:-1} -x '/data/galaxy/galaxy/tool-data/hg38/hisat2_index/hg38/hg38' -f -U 'input_f.fasta'
      8800 Segmentation fault      (core dumped) | samtools sort - -@ ${GALAXY_SLOTS:-1} -l 6 -o '/data/galaxy/galaxy/database/files/000/dataset_131.dat'


Fatal error: Exit code 141 ()
sort: invalid option -- '@'
sort: invalid option -- '1'
sort: invalid option -- 'O'
open: No such file or directory
[bam_sort_core] fail to open file bam


Fatal error: Unknown error occured
sort: invalid option -- '-'
sort: invalid option -- 'u'
sort: invalid option -- 't'
sort: invalid option -- 'p'
sort: invalid option -- 'u'
sort: invalid option -- 't'
sort: invalid option -- '-'
sort: invalid option -- 'f'
open: No such file or directory
[bam_sort_core] fail to open file name_sorted_alignment.sam
  [Errno 2] No such file or directory: 'name_sorted_alignment.sam'
  [Exception type: IOError, raised in]

Samtools Sort:

Also throws an error and does not complete but there is no error message.

bwa galaxy hisat2 • 435 views
ADD COMMENTlink modified 7 months ago by Jennifer Hillman Jackson25k • written 7 months ago by gkuffel22170

Can you reproduce this at a public server (try Galaxy Main Or is this only occurring on your local?

If can reproduce at Main, please send in a bug report and include a link to this post in the comments.

If you cannot, would you confirm that your server is running Galaxy version 18.01 and the most current version of the mappers (installed from the ToolShed)?

ADD REPLYlink written 7 months ago by Jennifer Hillman Jackson25k

I cannot reproduce these errors on the public server. This problem is only occurring on our local. We are indeed running version 18.01 of Galaxy. Here are the versions of the tools as shown in "Manage Dependencies":

HISAT2  /data/galaxy/galaxy/database/dependencies/_conda/envs/mulled-v1-3b104c294f65450b09ba89d24826c61eddd553d789c9f1ae48a29715de1b7426    hisat2  2.1.0   Conda   True

htseq-count /data/galaxy/galaxy/database/dependencies/_conda/envs/mulled-v1-c9f488ec0e9a96bed61dcc2e074b26ce37ed596751861ff368fd824a2a5f11d4    htseq   0.9.1   Conda   True

Map with BWA, Map with BWA-MEM  /data/galaxy/galaxy/database/dependencies/_conda/envs/mulled-v1-a1698655ddc683fd2767d127c7c583056e87322876f94e167ba3900da02c1fc4    bwa 0.7.17  Conda   True    

Sort, Split /data/galaxy/galaxy/database/dependencies/_conda/envs/__samtools@1.3.1  samtools    1.3.1
ADD REPLYlink written 7 months ago by gkuffel22170

I'm not sure if this helps or is related but I see this information on the running log that I keep open when I start our Galaxy server: WARNING 2018-04-27 10:00:37,920 [p:21025,w:0,m:0] [MainThread] Tool __SORTLIST__: a when tag has not been defined for 'sort_type (sort_type) --> alpha', assuming empty inputs. WARNING 2018-04-27 10:00:37,920 [p:21025,w:0,m:0] [MainThread] Tool __SORTLIST__: a when tag has not been defined for 'sort_type (sort_type) --> numeric', assuming empty inputs.
ADD REPLYlink written 7 months ago by gkuffel22170
gravatar for Jennifer Hillman Jackson
7 months ago by
United States
Jennifer Hillman Jackson25k wrote:


AH, Ok, I found the issue. A fix was made to 18.01 after the initial release when this bug was found. These corrections were important enough to back-port. Try updating your server with git to capture the all the point-fixes made since you originally got the distribution. Or, compare what you have now and decide which to get individually.

This will involve a server restart, so you might want to have users to stop running jobs while you do this or at least warning them you are restarting (the server will inaccessible during the restart), then check for and restart/rerun any jobs that need admin intervention.

Problem ticket and details (I was involved, just didn't link your specific issue back to that set of issues first pass, my apologies!):

I'm rerunning a few of the derivative tests but this will take some time to complete (against 18.05 pre-release loaded at now, it includes this fix too). I expect to be closing this ticket out later today or tomorrow once done. If anything doesn't check out, updates will post back to the same ticket.

Also please let us know if you problems continue (with new dataset uploads/jobs runs) after you update/restart. I would strongly discourage you from upgrading to the 18.05 pre-release -- much is still in flux. It is better to use release branches announced here. 18.01 is still the latest (18.05 is ~1-2 weeks out).

Thanks for reporting the problem! Jen, Galaxy team

ADD COMMENTlink written 7 months ago by Jennifer Hillman Jackson25k

Hi Jen, I am the administrator of the server and Gina and I have been working together to try and resolve these issues, but I just a couple questions. One, I did download and install version 18.01 on April 11th. Are you saying there is another release of 18.01 after that? Two, this server runs other things, do I have to completely restart the server or just the galaxy service?

Thanks, Joe

ADD REPLYlink written 7 months ago by jkoral100

The Github repository shows the history/date of all changes made -- including those back-ported. The back-ported updates to 18.01 are added back into the base release, and only after careful consideration about the impact. New functionality is not introduced, just fixes.

To capture all backported changes, admins should be checking those updates at regular intervals and updating as needed. Set up Git for repo notifications if that helps. Get all new changesets or just those you think you need (if any). Most will include important bug fixes.

Updates do require a restart. Stop Galaxy, update, then start it up again along with any associated services as needed. Please consider using Ancible: Examples of what we use for Galaxy Main and backend infrastructure for that server are in the other repositories under with "ansible" in the name.

18.01 was our largest release to date with many upgrades, so it includes a bit more post-initial-release backported fixes than usual. 18.05 will also be a big release with many upgrades.

We do our best to catch problems with local install tests first, then publically host the pre-release on the Test server and test there, and after that host it at Main ( and continue testing/fixing things until stable. In the end, we create/announce the official release with detailed release notes.

The 18.05 pre-release is currently on Main now and a notification about that and how to communicate end-user problems encountered are in the top banner on the server. We rely on community feedback during some testing phases to capture real-use problems, and most are corner/stress-usage cases.

ADD REPLYlink written 6 months ago by Jennifer Hillman Jackson25k
Please log in to add an answer.


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