Skip to content
Snippets Groups Projects
Commit c43e5767 authored by Jeremy Mathews's avatar Jeremy Mathews
Browse files

Fix #34 to remove trailing and leading whitespace in design file contents

parent a2e68abf
Branches
Tags
3 merge requests!59Develop,!58Develop,!54Fix #34 to remove trailing and leading whitespace in design file contents
Pipeline #5100 passed with stages
in 2 minutes and 42 seconds
......@@ -3,7 +3,7 @@
* Change Cellranger Version to 3.1.0
* Fix countDesign to take multiple samples
* Add MIT License
* Check Design File for spaces in name
* Check Design File for spaces in name and file contents
* Update design example, README, and astrocyte.yml with current barcode IDs
**Background**
......
......@@ -55,7 +55,7 @@ def check_design_headers(design):
if len(missing_headers) > 0:
logger.error('Missing column headers: %s', list(missing_headers))
raise Exception("Missing column headers: %s" % list(missing_headers))
return design
def main():
......@@ -67,7 +67,7 @@ def main():
logger.addHandler(handler)
# Read files as dataframes
design_df = pd.read_csv(args.design, sep=',')
design_df = pd.read_csv(args.design, sep=',', converters={'Lane': str.strip, 'Sample': str.strip, 'Index': str.strip})
# Check design file
new_design_df = check_design_headers(design_df)
......@@ -75,4 +75,4 @@ def main():
new_design_df.to_csv('design.checked.csv', header=True, sep=',', index=False)
if __name__ == '__main__':
main()
\ No newline at end of file
main()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment