gt1 / biobambam2

Tools for early stage alignment file processing
Other
93 stars 17 forks source link

Specifying parameters on the command line #30

Closed markmcdowall closed 7 years ago

markmcdowall commented 7 years ago

Hi,

When I started trying to use the bamsormadup (and bamsort) it took me quit some time to realise how the parameters should be specified.

My first attempts were with:

bamsort -I input.bam -O output.bam
bamsort --I=input.bam --O=output.bam

These seem to be the standard in other applications, would it be possible to implement these in Biobambam2? If not could there be some worked examples in the README that show how an example command should be be formed?

Thank you,

Mark

hurchu commented 7 years ago

Hi Mark,

I still can't figure out how to specify parameters for bamsormadup.

I tried bamsormadup inputformat=bam indexfilename=gcat_set_025.biobambam2.dup.bam.bai M=gcat_set_025.biobambam2.duplication_metrics gcat_set_025.bam> gcat_set_025.biobambam2.dup.bam

but it didn't work.

Could you please tell me how to run bamsormadup when input is a coordinate-sorted or name sorted file?

Best,

Junfei

whitwham commented 7 years ago

Hello Junfei,

The basic usage would be something like this for name sorted:

bamsormadup SO=queryname < input.bam > output.bam

Regards,

Andrew

gt1 commented 7 years ago

Hi,

the way biobambam(2) takes command line options as key=value pairs was originally chosen to allow a simple transition from Picard (one of the first tools was bammarkduplicates, which was written to avoid some of the memory issues seen in Picard's MarkDuplicates at that time). I have added a section in the README.md file which will hopefully be helpful. Otherwise I think that changing the command line parsing in a minor revision would be a bad thing confusing lots of people. If I ever release something called biobambam3, then I may consider changing the option passing.

Best, German