transcript / samsa2

SAMSA pipeline, version 2.0. An open-source metatranscriptomics pipeline for analyzing microbiome data, built around DIAMOND and customizable reference databases.
GNU General Public License v3.0
56 stars 36 forks source link

Bad operand protections - DIAMOND_specific_organism_retriever.py can be overwritten when calling it #27

Open jfvorwald opened 5 years ago

jfvorwald commented 5 years ago

Recently I've been helping some researchers with their Samsa2 troubles. I've noticed a few students using operands inappropriately leading to some headaches. I know it's hard to account for this stuff but it might be nice to actively help prevent them!

In the file DIAMOND_specific_organism_retriever.py you might consider adding the following check after the -O, sys.argv parsing. I have seen a few students make this mistake.

if target_org_outfile == os.path.basename(__file__): sys.exit("Cannot write to the file we are specifying: target_org_outfile: {}".format(target_org_outfile))

jfvorwald commented 5 years ago

I will PR the suggestion this weekend if you just want to wait to review the suggestion :)

transcript commented 5 years ago

Hi Jack,

First, thank you for helping out researchers looking to use this tool! I do my best to provide support, both here and through the SAMSA Google group, but I can't get to everyone.

Yes, it would be great if you submit a PR, and I'll take a look and approve it. Thank you! Sam

On Tue, Mar 5, 2019 at 8:36 PM Jack Vorwald notifications@github.com wrote:

I will PR the suggestion this weekend if you just want to wait to review the suggestion :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/transcript/samsa2/issues/27#issuecomment-469965114, or mute the thread https://github.com/notifications/unsubscribe-auth/AGz51jbxV7xdUvypn1aCqETk6EUg1R9zks5vT0XigaJpZM4bgCGN .

-- Sam Westreich Microbiome Scientist, DNAnexus, http://www.mosaicbiome.com