Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variant Calling Workflow: example has incorrect samtool sort options and param #211

Open
msuhovec opened this issue Mar 5, 2020 · 1 comment

Comments

@msuhovec
Copy link

msuhovec commented Mar 5, 2020

We taught the variant calling lesson here at Notre Dame on 3/4/20.

At one point in the lesson, this use of samtools sort is given:

Sort BAM file by coordinates
Next we sort the BAM file using the sort command from samtools. -o tells the command where to write the output.

$ samtools sort -o results/bam/SRR2584866.aligned.sorted.bam results/bam/SRR2584866.aligned.bam 

We are using samtools version 1.9 here, and with version there are several problems with the example:

  1. The -o option will send the output to standard out
  2. The source and destination parameters are swapped.
  3. A destination file name is given, rather than a file prefix- this results in a results file ending in bam.bam

The usage syntax that worked fro us was:

samtools sort results/bam/SRR2584866.aligned.bam results/bam/SRR2584866.aligned.sorted

`

@fpsom
Copy link
Contributor

fpsom commented Mar 6, 2020

Hi @msuhovec ! Thank you for your comment and for raising this issue. I remember testing the exact commands with no issues, so I am a bit perplexed as to why this happened.

Looking through the samtools manual here it says the following:

The sorted output is written to standard output by default, or to the specified file (out.bam) when -o is used. 

Additionally, swapping source and destination should not matter, given that the -o is specified.

Also, I just tried the command (locally, and not on the Amazon image) and it seems to work fine. However, it is a distinct possibility that this was an issue in the image directly.

During the workshop, did you use a local installation, or the Carpentries-provided Amazon instance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants