Skip to content

Commit a6b225d

Browse files
authored
Merge pull request #56 from abhicodes369/created_repostatus/statistics
report on repo
2 parents 2c3787e + e17a3e7 commit a6b225d

File tree

5 files changed

+234
-21
lines changed

5 files changed

+234
-21
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ md5sums.txt
2121
.cache
2222
nosetests.xml
2323
coverage.xml
24-
*.pyc
24+
*.pyc

doc/code_contributions_record.csv

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
Technique,Category,Subcategory,notes,subfolder,Link to source code,Authors,Institution,function/module,DOI,Tester,test status
2-
IVIM,Fitting,LSQ fitting,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion,Amsterdam UMC,fit_least_squares/fit_least_squares_array,,tbd,
3-
IVIM,Fitting,segmented LSQ fitting,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion,Amsterdam UMC,fit_segmented/fit_segmented_array,,tbd,
4-
Tri-exponential,Fitting,LSQ fitting,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion,Amsterdam UMC,fit_least_squares_tri_exp/fit_least_squares_array_tri_exp,,tbd,
5-
Tri-exponential,Fitting,Segmented LSQ fitting,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion,Amsterdam UMC,fit_segmented_tri_exp/fit_segmented_array_tri_exp,https://doi.org/10.3389/fphys.2022.942495,tbd,
6-
IVIM,Fitting,Bayesian,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion/Sebastiano Barbieri,Amsterdam UMC,fit_bayesian_array,https://doi.org/10.1002/mrm.28852,tbd,
7-
IVIM,Fitting,two-step segmented fit approach,also includes ADC calculation as a separate function,PvH_KB_NKI,TF2.4_IVIM-MRI_CodeCollection/src/original/PvH_KB_NKI/,Petra van Houdt/Stefan Zijlema/Koen Baas,the Netherlands Cancer Institute,DWI_functions_standalone.py,https://doi.org/10.3389/fonc.2021.705964,tbd,
8-
IVIM,Fitting,two-step (segmented) LSQ fitting, cut-off chosen for brain data; option to fit IVIM with inversion recovery or without IR,PV_MUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/PV_MUMC/,Paulien Voorter,Maastricht University Medical Center,two_step_IVIM_fit.py,,tbd,
9-
IVIM,Fitting,bi-exponential NLLS,Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_biexp.py,Ivan A. Rashid,Lund University,IvimModelBiexp,tba,tbd,
10-
IVIM,Fitting,2-step segmented NLLS,First estimates and fixes D before a bi-exponential NLLS fit. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_segmented_2step.py,Ivan A. Rashid,Lund University,IvimModelSegmented2Step,tba,tbd,
11-
IVIM,Fitting,3-step segmented NLLS,First estimates and fixes D followed by an estimate of D* followed by a bi-exponential NLLS fit. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_segmented_3step.py,Ivan A. Rashid,Lund University,IvimModelSegmented3Step,tba,tbd,
12-
IVIM,Fitting,2-step segmented NLLS,First estimates and fixes D. Subtracts the diffusion signal and estimated D*. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_subtracted.py,Ivan A. Rashid,Lund University,IvimModelSubtracted,tba,tbd,
13-
IVIM,Fitting,Variable projection,See referenced article. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_mix.py,Farooq et al. Modified by Ivan A. Rashid,Lund University,IvimModelVP,https://doi.org/10.1038/srep38927,tbd,
14-
IVIM,Fitting,Variable projection,See referenced article. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_topopro.py,Fadnavis et al. Modified by Ivan A. Rashid,Lund University,IvimModelTopoPro,https://doi.org/10.3389/fnins.2021.779025,tbd,
15-
IVIM,Fitting,Linear fit,Linear fit for D with extrapolation for f. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_linear.py,Modified by Ivan A. Rashid,Lund University,IvimModelLinear,tba,tbd,
16-
IVIM,Fitting,sIVIM fit,NLLS of the simplified IVIM model (sIVIM). Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_sivim.py,Modified by Ivan A. Rashid,Lund University,IvimModelsIVIM,tba,tbd,
17-
IVIM,Fitting,Segmented NLLS fitting,MATLAB code,OJ_GU,TF2.4_IVIM-MRI_CodeCollection/src/original/OJ_GU/,Oscar Jalnefjord,University of Gothenburg,IVIM_seg,https://doi.org/10.1007/s10334-018-0697-5,tbd,
18-
IVIM,Fitting,Bayesian,MATLAB code,OJ_GU,TF2.4_IVIM-MRI_CodeCollection/src/original/OJ_GU/,Oscar Jalnefjord,University of Gothenburg,IVIM_bayes,https://doi.org/10.1002/mrm.26783,tbd,
19-
IVIM,Fitting,Segmented NLLS fitting,Specifically tailored algorithm for NLLS segmented fitting,OJ_GU,TF2.4_IVIM-MRI_CodeCollection/src/original/OJ_GU/,Oscar Jalnefjord,University of Gothenburg,seg,https://doi.org/10.1007/s10334-018-0697-5,tbd,
20-
IVIM,Fitting,Linear fit,Linear fit for D and D* and f. Intended to be extremely fast but not always accurate,ETP_SRI,TF2.4_IVIM-MRI_CodeCollection/src/original/ETP_SRI/LinearFitting.py,Eric Peterson,SRI International,,,tbd,
1+
Technique,Category,Subcategory,notes,subfolder,Link to source code,Authors,Institution,function/module,DOI,Tester,test status,Wrapped
2+
IVIM,Fitting,LSQ fitting,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion,Amsterdam UMC,fit_least_squares/fit_least_squares_array,,tbd,,
3+
IVIM,Fitting,segmented LSQ fitting,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion,Amsterdam UMC,fit_segmented/fit_segmented_array,,tbd,,OGC_AmsterdamUMC_biexp
4+
Tri-exponential,Fitting,LSQ fitting,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion,Amsterdam UMC,fit_least_squares_tri_exp/fit_least_squares_array_tri_exp,,tbd,,
5+
Tri-exponential,Fitting,Segmented LSQ fitting,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion,Amsterdam UMC,fit_segmented_tri_exp/fit_segmented_array_tri_exp,https://doi.org/10.3389/fphys.2022.942495,tbd,,OGC_AmsterdamUMC_biexp_segmented
6+
IVIM,Fitting,Bayesian,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion/Sebastiano Barbieri,Amsterdam UMC,fit_bayesian_array,https://doi.org/10.1002/mrm.28852,tbd,,OGC_AmsterdamUMC_Bayesian_biexp
7+
IVIM,Fitting,two-step segmented fit approach,also includes ADC calculation as a separate function,PvH_KB_NKI,TF2.4_IVIM-MRI_CodeCollection/src/original/PvH_KB_NKI/,Petra van Houdt/Stefan Zijlema/Koen Baas,the Netherlands Cancer Institute,DWI_functions_standalone.py,https://doi.org/10.3389/fonc.2021.705964,tbd,,PvH_KB_NKI_IVIMfit
8+
IVIM,Fitting,two-step (segmented) LSQ fitting, cut-off chosen for brain data; option to fit IVIM with inversion recovery or without IR,PV_MUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/PV_MUMC/,Paulien Voorter,Maastricht University Medical Center,two_step_IVIM_fit.py,,tbd,,PV_MUMC_biexp
9+
IVIM,Fitting,bi-exponential NLLS,Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_biexp.py,Ivan A. Rashid,Lund University,IvimModelBiexp,tba,tbd,,IAR_LU_biexp
10+
IVIM,Fitting,2-step segmented NLLS,First estimates and fixes D before a bi-exponential NLLS fit. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_segmented_2step.py,Ivan A. Rashid,Lund University,IvimModelSegmented2Step,tba,tbd,,IAR_LU_segmented_2step
11+
IVIM,Fitting,3-step segmented NLLS,First estimates and fixes D followed by an estimate of D* followed by a bi-exponential NLLS fit. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_segmented_3step.py,Ivan A. Rashid,Lund University,IvimModelSegmented3Step,tba,tbd,,IAR_LU_segmented_3step
12+
IVIM,Fitting,2-step segmented NLLS,First estimates and fixes D. Subtracts the diffusion signal and estimated D*. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_subtracted.py,Ivan A. Rashid,Lund University,IvimModelSubtracted,tba,tbd,,IAR_LU_subtracted
13+
IVIM,Fitting,Variable projection,See referenced article. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_mix.py,Farooq et al. Modified by Ivan A. Rashid,Lund University,IvimModelVP,https://doi.org/10.1038/srep38927,tbd,,IAR_LU_modified_mix
14+
IVIM,Fitting,Variable projection,See referenced article. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_topopro.py,Fadnavis et al. Modified by Ivan A. Rashid,Lund University,IvimModelTopoPro,https://doi.org/10.3389/fnins.2021.779025,tbd,,IAR_LU_modified_topopro
15+
IVIM,Fitting,Linear fit,Linear fit for D with extrapolation for f. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_linear.py,Modified by Ivan A. Rashid,Lund University,IvimModelLinear,tba,tbd,,
16+
IVIM,Fitting,sIVIM fit,NLLS of the simplified IVIM model (sIVIM). Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_sivim.py,Modified by Ivan A. Rashid,Lund University,IvimModelsIVIM,tba,tbd,,
17+
IVIM,Fitting,Segmented NLLS fitting,MATLAB code,OJ_GU,TF2.4_IVIM-MRI_CodeCollection/src/original/OJ_GU/,Oscar Jalnefjord,University of Gothenburg,IVIM_seg,https://doi.org/10.1007/s10334-018-0697-5,tbd,,OJ_GU_seg
18+
IVIM,Fitting,Bayesian,MATLAB code,OJ_GU,TF2.4_IVIM-MRI_CodeCollection/src/original/OJ_GU/,Oscar Jalnefjord,University of Gothenburg,IVIM_bayes,https://doi.org/10.1002/mrm.26783,tbd,,
19+
IVIM,Fitting,Segmented NLLS fitting,Specifically tailored algorithm for NLLS segmented fitting,OJ_GU,TF2.4_IVIM-MRI_CodeCollection/src/original/OJ_GU/,Oscar Jalnefjord,University of Gothenburg,seg,https://doi.org/10.1007/s10334-018-0697-5,tbd,,
20+
IVIM,Fitting,Linear fit,Linear fit for D and D* and f. Intended to be extremely fast but not always accurate,ETP_SRI,TF2.4_IVIM-MRI_CodeCollection/src/original/ETP_SRI/LinearFitting.py,Eric Peterson,SRI International,,,tbd,,ETP_SRI_LinearFitting

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ cvxpy
1111
zenodo-get
1212
pytest
1313
tqdm
14+
pandas
1415
sphinx
1516
sphinx_rtd_theme

utilities/repostatus.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import os
2+
import pandas as pd
3+
import json
4+
5+
# directory of the current script
6+
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
7+
8+
# path to the repository
9+
REPO_DIR = os.path.dirname(SCRIPT_DIR)
10+
11+
CODE_CONTRIBUTIONS_FILE = os.path.join(REPO_DIR, "doc", "code_contributions_record.csv")
12+
ALGORITHMS_FILE = os.path.join(REPO_DIR, "tests", "IVIMmodels", "unit_tests", "algorithms.json")
13+
SOURCE_FOLDER = os.path.join(REPO_DIR, "src", "original")
14+
WRAPPED_FOLDER = os.path.join(REPO_DIR, "src", "standardized")
15+
16+
def generate_html():
17+
"""
18+
Generates an HTML report based on the code contributions and algorithm information.
19+
20+
The report includes the following columns:
21+
- Technique
22+
- Subfolder
23+
- Contributors
24+
- Wrapped
25+
- Tested
26+
27+
The report is saved as 'combined_report.html' in the 'website' directory of the repository.
28+
"""
29+
# Read the CSV file
30+
df = pd.read_csv(CODE_CONTRIBUTIONS_FILE)
31+
32+
unique_subfolders = df['subfolder'].unique().tolist()
33+
34+
# Read the JSON file
35+
with open(ALGORITHMS_FILE, 'r') as f:
36+
algorithms_data = json.load(f)
37+
38+
# list of all algorithms from the JSON file
39+
all_algorithms = algorithms_data['algorithms']
40+
41+
# Check if both code_contributions_file matches with source folder
42+
for subfolder in unique_subfolders:
43+
subfolder_path = os.path.join(SOURCE_FOLDER, subfolder)
44+
if not os.path.exists(subfolder_path):
45+
print(f"Warning: Subfolder '{subfolder}' does not exist in the source folder.")
46+
47+
# Add column 'Tested' to the DataFrame based on a match with algorithms and wrapped column
48+
df['Wrapped'] = df['Wrapped'].fillna('')
49+
df['Tested'] = df.apply(lambda row: 'Yes' if any(algorithm in row['Wrapped'] for algorithm in all_algorithms) else '', axis=1)
50+
51+
# Select the desired columns
52+
df_selected = df[['Technique', 'subfolder', 'Authors', 'Wrapped', 'Tested']]
53+
df_selected.columns = ['Technique', 'Subfolder', 'Contributors', 'Wrapped', 'Tested']
54+
55+
# Convert the DataFrame to HTML
56+
html_string = df_selected.to_html(index=False)
57+
58+
# Save the HTML to a file
59+
with open(os.path.join(REPO_DIR, 'website', 'combined_report.html'), 'w') as f:
60+
f.write(html_string)
61+
62+
# Printing message that report has been successfully generated
63+
print("Combined HTML report generated successfully.")
64+
65+
if __name__ == "__main__":
66+
generate_html()

website/combined_report.html

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
<table border="1" class="dataframe">
2+
<thead>
3+
<tr style="text-align: right;">
4+
<th>Technique</th>
5+
<th>Subfolder</th>
6+
<th>Contributors</th>
7+
<th>Wrapped</th>
8+
<th>Tested</th>
9+
</tr>
10+
</thead>
11+
<tbody>
12+
<tr>
13+
<td>IVIM</td>
14+
<td>OGC_AmsterdamUMC</td>
15+
<td>Oliver Gurney-Champion</td>
16+
<td></td>
17+
<td></td>
18+
</tr>
19+
<tr>
20+
<td>IVIM</td>
21+
<td>OGC_AmsterdamUMC</td>
22+
<td>Oliver Gurney-Champion</td>
23+
<td>OGC_AmsterdamUMC_biexp</td>
24+
<td>Yes</td>
25+
</tr>
26+
<tr>
27+
<td>Tri-exponential</td>
28+
<td>OGC_AmsterdamUMC</td>
29+
<td>Oliver Gurney-Champion</td>
30+
<td></td>
31+
<td></td>
32+
</tr>
33+
<tr>
34+
<td>Tri-exponential</td>
35+
<td>OGC_AmsterdamUMC</td>
36+
<td>Oliver Gurney-Champion</td>
37+
<td>OGC_AmsterdamUMC_biexp_segmented</td>
38+
<td>Yes</td>
39+
</tr>
40+
<tr>
41+
<td>IVIM</td>
42+
<td>OGC_AmsterdamUMC</td>
43+
<td>Oliver Gurney-Champion/Sebastiano Barbieri</td>
44+
<td>OGC_AmsterdamUMC_Bayesian_biexp</td>
45+
<td>Yes</td>
46+
</tr>
47+
<tr>
48+
<td>IVIM</td>
49+
<td>PvH_KB_NKI</td>
50+
<td>Petra van Houdt/Stefan Zijlema/Koen Baas</td>
51+
<td>PvH_KB_NKI_IVIMfit</td>
52+
<td>Yes</td>
53+
</tr>
54+
<tr>
55+
<td>IVIM</td>
56+
<td>PV_MUMC</td>
57+
<td>Paulien Voorter</td>
58+
<td>PV_MUMC_biexp</td>
59+
<td>Yes</td>
60+
</tr>
61+
<tr>
62+
<td>IVIM</td>
63+
<td>IAR_LundUniversity</td>
64+
<td>Ivan A. Rashid</td>
65+
<td>IAR_LU_biexp</td>
66+
<td>Yes</td>
67+
</tr>
68+
<tr>
69+
<td>IVIM</td>
70+
<td>IAR_LundUniversity</td>
71+
<td>Ivan A. Rashid</td>
72+
<td>IAR_LU_segmented_2step</td>
73+
<td>Yes</td>
74+
</tr>
75+
<tr>
76+
<td>IVIM</td>
77+
<td>IAR_LundUniversity</td>
78+
<td>Ivan A. Rashid</td>
79+
<td>IAR_LU_segmented_3step</td>
80+
<td>Yes</td>
81+
</tr>
82+
<tr>
83+
<td>IVIM</td>
84+
<td>IAR_LundUniversity</td>
85+
<td>Ivan A. Rashid</td>
86+
<td>IAR_LU_subtracted</td>
87+
<td>Yes</td>
88+
</tr>
89+
<tr>
90+
<td>IVIM</td>
91+
<td>IAR_LundUniversity</td>
92+
<td>Farooq et al. Modified by Ivan A. Rashid</td>
93+
<td>IAR_LU_modified_mix</td>
94+
<td>Yes</td>
95+
</tr>
96+
<tr>
97+
<td>IVIM</td>
98+
<td>IAR_LundUniversity</td>
99+
<td>Fadnavis et al. Modified by Ivan A. Rashid</td>
100+
<td>IAR_LU_modified_topopro</td>
101+
<td>Yes</td>
102+
</tr>
103+
<tr>
104+
<td>IVIM</td>
105+
<td>IAR_LundUniversity</td>
106+
<td>Modified by Ivan A. Rashid</td>
107+
<td></td>
108+
<td></td>
109+
</tr>
110+
<tr>
111+
<td>IVIM</td>
112+
<td>IAR_LundUniversity</td>
113+
<td>Modified by Ivan A. Rashid</td>
114+
<td></td>
115+
<td></td>
116+
</tr>
117+
<tr>
118+
<td>IVIM</td>
119+
<td>OJ_GU</td>
120+
<td>Oscar Jalnefjord</td>
121+
<td>OJ_GU_seg</td>
122+
<td></td>
123+
</tr>
124+
<tr>
125+
<td>IVIM</td>
126+
<td>OJ_GU</td>
127+
<td>Oscar Jalnefjord</td>
128+
<td></td>
129+
<td></td>
130+
</tr>
131+
<tr>
132+
<td>IVIM</td>
133+
<td>OJ_GU</td>
134+
<td>Oscar Jalnefjord</td>
135+
<td></td>
136+
<td></td>
137+
</tr>
138+
<tr>
139+
<td>IVIM</td>
140+
<td>ETP_SRI</td>
141+
<td>Eric Peterson</td>
142+
<td>ETP_SRI_LinearFitting</td>
143+
<td>Yes</td>
144+
</tr>
145+
</tbody>
146+
</table>

0 commit comments

Comments
 (0)