@@ -528,6 +528,13 @@ def __get_cnbtaxonomy(df):
528
528
return df ["cnbtaxonomy" ].value_counts ().to_dict ()
529
529
530
530
531
+ def __get_genotypes (df ):
532
+ """
533
+ Write documentation here.
534
+ """
535
+ return df ["genotype" ].unique ()
536
+
537
+
531
538
def __get_genotype_frequency (df ):
532
539
"""
533
540
Get a dictionary containing the count of occurrences of each unique genotype.
@@ -811,24 +818,18 @@ def __get_project_names(df):
811
818
812
819
def __get_list_of_projects (df ):
813
820
"""
814
- Get the list of names for unique projects
815
-
816
- Input parameter: dataframe
817
- Output: list of projects
818
- """
819
-
820
- return df ["project" ].unique ().to_dict ()
821
-
822
-
823
- def __get_number_of_projects (df ):
821
+ Retrieve the json_file from the Brain Image Library of a dataset.
824
822
"""
825
- Get the number of unique projects
826
823
827
- Input parameter: dataframe
828
- Output: number of projects
829
- """
824
+ # Make sure there is data to request
825
+ if df ["score" ].values [0 ] != 0 :
826
+ # Create working link
827
+ url = df ["json_file" ].values [0 ].replace ("/bil/data" , link )
828
+ response = requests .get (url )
830
829
831
- return len (df ["project" ].unique ())
830
+ return response .json ()
831
+ else :
832
+ return None
832
833
833
834
834
835
def get_projects_treemap (df ):
0 commit comments