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

wgsim: Please add is_flip (the orientation) to the read ID #9

Open
sjackman opened this issue Jul 9, 2015 · 3 comments
Open

wgsim: Please add is_flip (the orientation) to the read ID #9

sjackman opened this issue Jul 9, 2015 · 3 comments

Comments

@sjackman
Copy link

sjackman commented Jul 9, 2015

From @sjackman on February 26, 2015 17:51

The read ID output by wgsim does not include the orientation of the read, is_flip. It would be really useful to include the orientation.

A read ID currently has six fields separated by underscores
@0_80_129_0:0:0_0:0:0_e/1

Can we add a seventh field that specifies 1 for reverse complement and 0 otherwise? I'd be happy to submit a pull request if you agree.
@0_80_129_0:0:0_0:0:0_e_0/1 or @0_80_129_0:0:0_0:0:0_e_1/1

https://github.com/samtools/samtools/blob/develop/misc/wgsim.c#L345-L347

                fprintf(fpo[j], "@%s_%u_%u_%d:%d:%d_%d:%d:%d_%llx/%d\n", ks->name.s, ext_coor[0]+1, ext_coor[1]+1,
                        n_err[0], n_sub[0], n_indel[0], n_err[1], n_sub[1], n_indel[1],
                        (long long)ii, j==0? is_flip+1 : 2-is_flip);

Copied from original issue: samtools/samtools#355

@sjackman
Copy link
Author

sjackman commented Jul 9, 2015

From @jkbonfield on July 8, 2015 16:19

It took some head scratching to understand how j and is_flip work there. Confusing but probably less so that 1+(j!=is_flip) :-)

From my reading of the code, is_flip represents the template orientation, correct? If so I agree that it would be useful to add it. I have no idea though what parses this name and how much we'd break by adding an additional field. Certainly wgsim_eval.pl would need changing, maybe more.

Note there is also a newer version in https://github.com/lh3/wgsim/, so it's forked out of samtools now it looks.

@sjackman
Copy link
Author

sjackman commented Jul 9, 2015

Which is the canonical version of wgsim, samtools/samtools or lh3/wgsim?

@sjackman
Copy link
Author

sjackman commented Jul 9, 2015

From @jkbonfield on July 9, 2015 8:25

I assume lh3/wgsim as it's newer and his README seems to imply this too. However I don't know for sure.

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

1 participant