annotate tools/myTools/bin/get_RONs.py @ 1:7e5c71b2e71f draft default tip

Uploaded
author laurenmarazzi
date Wed, 22 Dec 2021 16:00:34 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
1 #!/usr/bin/env python3
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
2 import pandas as pd
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
3 import sys
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
4
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
5 def main():
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
6
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
7 # read in sfa attractors
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
8 df=pd.read_csv(sys.argv[1], delim_whitespace=True,index_col = ["name"])
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
9 # read in rons
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
10 rons = open(sys.argv[2],"r").read().strip().split('\n')
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
11 #get the rons and their values
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
12 df1=df.loc[:,rons]
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
13 df1.to_csv("exp_internalmarkers.tsv",sep=' ',index_label="name",na_rep='NA')
7e5c71b2e71f Uploaded
laurenmarazzi
parents:
diff changeset
14 main()