Skip to content

Conversation

@jdr479
Copy link
Contributor

@jdr479 jdr479 commented Oct 6, 2022

No description provided.

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")
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

3 participants