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

matutils extract segfaults with -s, but not -K, if no samples in text file are on tree #365

Open
aofarrel opened this issue Feb 14, 2024 · 1 comment

Comments

@aofarrel
Copy link
Contributor

matutils extract can extract samples as specified via a text file via -s or -K, and in either case the format of the text file is the same. However, there is inconsistent behavior when the text file only lists samples that are not on the tree. In the case of -s the program segfaults, but in the case of -K it will handle the error gracefully and output a "subtree" that isn't actually a subtree.

example

Zip file with this example: example_pb_and_txt.zip

The samples within 2_samples_invalid.txt are not on the tree.

SAMEA5626318_foo
SAMEA111556040_bar

If I run matUtils extract -i 10_sra_samples.pb -K 2_samples_invalid.txt:1 -o some.subtree.pb, the program will point out these samples are not on the tree, and it will output a "subtree" that isn't actually a subtree.

If I run matUtils extract -i 10_sra_samples.pb -s 2_samples_invalid.txt -o some.subtree.pb, the program will segfault.

expected behavior

One of the following:

  • Both -K and -s throw a handled error and the output is essentially the same as the input (current -K behavior)
  • Both -K and -s throw a handled error and there is no output
@yatisht
Copy link
Owner

yatisht commented Feb 15, 2024

Thanks for reporting, @aofarrel.

@jmcbroome are you available to look into this?

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