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

Does it work the "-o" flag in top verb? #861

Closed
aborruso opened this issue Jan 11, 2022 · 6 comments
Closed

Does it work the "-o" flag in top verb? #861

aborruso opened this issue Jan 11, 2022 · 6 comments

Comments

@aborruso
Copy link
Contributor

I have the below CSV. If run

mlr --csv --implicit-csv-header top -f 5 -a -o "test" -F -n 2 -g 1 input.tsv

I do not have any output related to -o flag. I probably didn't understand what it is for.

Thank you

1,861265,C,A,0.071
1,861265,C,A,0.148
1,861265,C,G,0.001
1,861265,C,G,0.108
1,861265,C,T,0
1,861265,C,T,0.216
2,193456,G,A,0.006
2,193456,G,A,0.094
2,193456,G,C,0.011
2,193456,G,C,0.152
2,193456,G,T,0.003
2,193456,G,T,0.056
@johnkerl
Copy link
Owner

Hi @aborruso --

There is no extra output field with -a.

$ mlr --csv --implicit-csv-header top -a -f 5 -o "test" -F -n 2 -g 1 input.tsv
1,2,3,4,5
1,861265,C,T,0.216
1,861265,C,A,0.148
2,193456,G,C,0.152
2,193456,G,A,0.094

$ mlr --csv --implicit-csv-header top -f 5 -F -n 2 -g 1 input.tsv
1,top_idx,5_top
1,1,0.216
1,2,0.148
2,1,0.152
2,2,0.094

$ mlr --csv --implicit-csv-header top -f 5 -o "test" -F -n 2 -g 1 input.tsv
1,test,5_top
1,1,0.216
1,2,0.148
2,1,0.152
2,2,0.094

I'll update the online help & docs for mlr top -- thank you! :)

@aborruso
Copy link
Contributor Author

There is no extra output field with -a.

Ok, thank you.

-o is to set "Field name for output indices". What is this index? How does Miller calculate it?

@aborruso
Copy link
Contributor Author

-o is to set "Field name for output indices". What is this index? How does Miller calculate it?

I think I understand, I'm dumb: it's the numeric index within the group

@johnkerl
Copy link
Owner

johnkerl commented Jan 12, 2022

@aborruso :) -- you know Miller very well and the on-line help confused you -- so it definitely needs to be clearer :)

johnkerl added a commit that referenced this issue Jan 16, 2022
* Doc improvements for mlr top -a

* Build-artifacts for previous commit
@johnkerl
Copy link
Owner

@aborruso what do you think of #875 and in particular https://miller.readthedocs.io/en/latest/reference-verbs#top (be sure to reload the page) ?

@aborruso
Copy link
Contributor Author

@aborruso what do you think of #875 and in particular https://miller.readthedocs.io/en/latest/reference-verbs#top (be sure to reload the page) ?

It's ok, thank you very much

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

No branches or pull requests

2 participants