-
Notifications
You must be signed in to change notification settings - Fork 295
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
Fix the append behavior in normalize-by-median.py (#745) #843
Conversation
|
jenkins, please test this |
ready for review |
@@ -514,6 +514,21 @@ def test_normalize_by_median(): | |||
assert len(seqs) == 1, seqs | |||
assert seqs[0].startswith('GGTTGACGGGGCTCAGGGGG'), seqs | |||
|
|||
# Testing for the apppend option |
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.
please make a separate test function instead -- more granular tests are generally better. So,
- copy the test function twice
- rename both copies
- remove the outfile/append tests from the original
- have one copy do the append test
- have the other copy do the not-append test
thanks!
@ctb please review |
LGTM on a skim - might ask @mr-c to review/merge since I can't get to it 'til much later today or maybe tomorrow. |
@@ -192,6 +192,9 @@ def get_parser(): | |||
dest='single_output_filename', | |||
default='', help='only output a single' | |||
' file with the specified filename') | |||
parser.add_argument('--append', default=False, action='store_true', | |||
help='append reads to the outputfile. ' | |||
'Only with -o specified') |
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.
I would word the help text this way: "appends reads instead of replacing the output file (only if -o/--out is specified)'
Nice work; thanks! |
Fix the append behavior in normalize-by-median.py (#745)
Fix #745: in normalize-by-median.py, change to the default behavior to overwrite the sequences output file. Also add a new argument --append to append new reads to the output file.
I also added a test for the --append option in test_scripts.py