Skip to content

Commit

Permalink
remove cache
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mdavid-m committed Mar 27, 2024
1 parent 99bba21 commit 55149f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pages/FileUpload.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def initializeWorkspace(input_types, parsed_df_types):
if df_type not in st.session_state:
st.session_state[df_type] = {}

@st.cache_data
#@st.cache_data
def getUploadedFileDF(deconv_files, anno_files, tag_files, db_files):
# leave only names
deconv_files = [Path(f).name for f in deconv_files]
Expand Down
4 changes: 2 additions & 2 deletions src/masstable.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ def parseFLASHDeconvOutput(annotated, deconvolved, tags, proteins):
df['Scan'] = scans
return df, annotateddf, tolerance, massoffset, chargemass, tag_df, protein_df

@st.cache_data
#@st.cache_data
def getSpectraTableDF(deconv_df: pd.DataFrame):
out_df = deconv_df[['Scan', 'MSLevel', 'RT', 'PrecursorMass']].copy()
out_df['#Masses'] = [len(ele) for ele in deconv_df['MinCharges']]
out_df.reset_index(inplace=True)
return out_df


@st.cache_data
#@st.cache_data
def getMSSignalDF(anno_df: pd.DataFrame):
ints = np.concatenate([anno_df.loc[index, "intarray"] for index in anno_df.index])
mzs = np.concatenate([anno_df.loc[index, "mzarray"] for index in anno_df.index])
Expand Down
4 changes: 2 additions & 2 deletions src/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def setFixedModification(protein):
return protein, fixed_mod_site


@st.cache_data
#@st.cache_data
def getFragmentDataFromSeq(sequence, coverage, maxCoverage):
protein = AASequence.fromString(sequence)
protein, fixed_mods = setFixedModification(protein) # handling fixed modifications
Expand Down Expand Up @@ -156,7 +156,7 @@ def getInternalFragmentMassesWithSeq(sequence, res_type):
return masses, start_indices, end_indices


@st.cache_data
ä@st.cache_data
def getInternalFragmentDataFromSeq(sequence):
# TODO: fixed modification
# protein = AASequence.fromString(sequence)
Expand Down

0 comments on commit 55149f9

Please sign in to comment.