-
Notifications
You must be signed in to change notification settings - Fork 2
Create get_replicate_average.py in response to issue #149 #172
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
base: master
Are you sure you want to change the base?
Conversation
| def main(): | ||
| arg_parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) | ||
| arg_parser.add_argument('-i', '--input', help="Name of input file that contains matrix with replicate totals") | ||
| arg_parser.add_argument('-n', '--rep_names', help="Name of file that contains sequences to be utilized") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually sample names, not "sequences". Also, for arguments in general, and especially ones that this that are going to require non-standard formats, it's important to describe the expected formats in the help message.
| sequence_dict = {} | ||
| base_sequences = [] | ||
|
|
||
| # Read in the name, score, and output files; print any errors found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice section to see. This type of error handling will definitely make the script more user friendly.
| while base_sequence_index < len(base_sequences): | ||
| # Check if sequence name contains base sequence name | ||
| if sequence_names_list[sequence_names_index].find(base_sequences[base_sequence_index]) != -1: | ||
| base_sequence_found = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I understanding correctly that you are checking to see if the base string is a substring of the individual sample names? This probably works in this example, but this is NOT something that I want to assume is true. This is the reason the replicate names are explicitly provided in the names input file.
No description provided.