Created
May 21, 2015 23:35
-
-
Save radaniba/9afffa82da4df055f6d0 to your computer and use it in GitHub Desktop.
Read a custom order that the user provides and output a list that will be given to some functions The file should contain one sample name per line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def read_custom_order(order_file): | |
""" | |
Read a custom order that the user provides and output a list that will | |
be given to some functions | |
The file should contain one sample name per line | |
""" | |
samples_order = [] | |
with open(order_file, 'r') as f: | |
for line in f: | |
samples_order.append(line.split(" ")[0]) | |
print samples_order | |
read_custom_order("test.txt") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment