carandraug / mRNA-localisation-screening

1 stars 3 forks source link

create HTML link and text box #1

Open jstitlow opened 6 years ago

jstitlow commented 6 years ago

HTML link to the OMERO.figure would be helpful if easy to add. Otherwise we can keep an OMERO.Figure open and paste the file ID into the URL.

We have also discussed a text entry box to note remarkable features in the image. Is this possible to implement?

carandraug commented 6 years ago

On 20 August 2018 at 16:59, Josh Titlow notifications@github.com wrote:

HTML link to the OMERO.figure would be helpful if easy to add. Otherwise we can keep an OMERO.Figure open and paste the file ID into the URL.

A link to the online figure would not make the questions blind.

We modify the figure to remove mention of the gene name but the online version still has the gene name.

We have also discussed a text entry box to note remarkable features in the image. Is this possible to implement?

Yes.

jstitlow commented 6 years ago

ok, we will have to think of a way to go back to the data without seeing the gene name.

MK helped me parse the directory of .pickle files:

import pickle
import subprocess
import sys
import os
import pandas as pd

indir, outname  = sys.argv[1:]

infiles = os.listdir(indir)

d = {}

for i in infiles:
        thisfile = os.path.join(os.getcwd(), indir, i)
        with open(thisfile, 'rb') as f:
                p = pickle.load(f)
                print('thispickle', p)
#       with open(os.path.join(os.getcwd(), indir, i), 'r') as f:
        #p = pickle.load(f)
                d[i.rstrip('.pickle')] = p

#print(d)
df = pd.DataFrame.from_dict(d, orient =  'index')
df.to_csv('%s.csv' % outname)
print(df)