bam filter losing metadata


I am trying to run a bam filter selecting for paired reads and properly mapped paired reads and I keep getting an error that says “An error occurred setting the metadata for this dataset” when running with the -b bam output flag. Auto-detection fails when retried.
The data starts as illumina forward and reverse fasq sequence data, imported with hg19 reference genome. I then ran the Burrow Wheeler Alignment on the data with hg19 as the reference genome. In further steps this error flag becomes a problem. Any help would be greatly appreciated.


1 Like


Welcome @bobloblog!

The tool Map with BWA for Illumina (Galaxy Version 1.2.3) is deprecated and only outputs SAM data (that is not coordinate sorted). However, the next step of your workflow has the option for BAM input set (coordinate sorting is required for this datatype to be assigned). The mismatched datatype/sort order is likely where the problem comes up.

Try swapping out the older/deprecated version of the tool for the latest version in your workflow: Map with BWA - map short reads (< 100 bp) against reference genome (Galaxy Version It will output BAM data that will work better, and avoid errors, with most other tools. This output format will also consume much less space in your account.

Alternative: The following is not recommended but is an option, if you really need to use the older BWA tool for some reason: Add in another one or two steps to your workflow, after mapping, and before downstream tools, to create proper inputs. Just using SAM-to-BAM might work, or you might need to run both SortSam (with default settings for a coordinate sort) then SAM-to-BAM.

ps: Next time you want to feedback for a workflow, please generate a share link and post that back (instead of screenshots). This is how: Sharing and Publishing your work. Including the exact error message presented in the interface in your post will also help if you want troubleshooting assistance from the community (error resulting from a workflow or not).

If you haven’t seen the troubleshooting help yet, please see: Troubleshooting resources for errors or unexpected results