Skip to content

Instantly share code, notes, and snippets.

@radaniba
Created May 21, 2015 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radaniba/9afffa82da4df055f6d0 to your computer and use it in GitHub Desktop.
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
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