Create get_replicate_average.py in response to issue #149#172
Create get_replicate_average.py in response to issue #149#172
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.
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.
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.
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.