In case anyone is interested I posted a message to samtools-dev and got a few responses about it.  The thread is called 'Picard bait/target format file for HsMetrics'.  Now, for Galaxy, I think the wrapper should not accept the BED file as input as that doesn't work.  I like the idea of a new file format (picardBaitTarget or maybe picardIntervalList) as the input type. 

If the converter tool adds a header to the BED file, then there is the possibility that a user can associated the BED file with the wrong version of a genome.  This is what Picard was trying to avoid.  But that doesn't mean a user can't manually add the wrong header anyway.  If the BED file is missing strand information, I don't think the tool should add it.  I would say just leave the rest of the file alone.  If there is no strand information, perhaps the user doesn't care about the strand.

On Mon, Jan 9, 2012 at 6:11 PM, Ross <ross.lazarus@gmail.com> wrote:
Hi Ryan,

Yes, the Picard tool mandates a bizarre bait/target format file for
reasons which might best be addressed to the Picard devs - they may
have some very good reasons although I can't imagine what they are.
:)

Yes, automated conversion of any valid Galaxy bed dataset into the
strange format required by the Picard tool is a very good idea. We're
already half way there because the tool wrapper adds the (IMHO really
silly) required SAM header automagically.

A new datatype (eg "picardBaitTarget") and an automated converter
would make the tool much easier to use - it's far from ideal to force
Galaxy users to comply with the strange Picard format requirements if
we can automate a converter.

I thought about implementing one but stopped when I realized that am
not sure what an automated converter should do if the user supplies a
valid Galaxy bed lacking strand information - generally, making up
strand is not a good idea. I don't have enough insight into the way
the stats are calculated to know whether bad things might happen if
(eg) we assume all the bait and target regions are on the + strand if
they're not - but if someone can describe how to automate the
conversion, it would definitely be an improvement to the usability of
the Picard tool.

Suggestions welcomed!


On Tue, Jan 10, 2012 at 8:03 AM, Ryan Golhar
<ngsbioinformatics@gmail.com> wrote:
> Hi all - I think there is a problem with the Picard HSMetrics wrapper in
> Galaxy.  The wrapper accepts a BAM files and a BED file.  However the BED
> file isn't really in a BED format...it requires a SAM header before the BED
> lines.  This really isn't a BED file format.  I'm not quite sure how Galaxy
> should deal with this...maybe a file format specific for Picard formatted
> BED file.
>
>