@@ -528,6 +528,13 @@ def __get_cnbtaxonomy(df):
528528 return df ["cnbtaxonomy" ].value_counts ().to_dict ()
529529
530530
531+ def __get_genotypes (df ):
532+ """
533+ Write documentation here.
534+ """
535+ return df ["genotype" ].unique ()
536+
537+
531538def __get_genotype_frequency (df ):
532539 """
533540 Get a dictionary containing the count of occurrences of each unique genotype.
@@ -811,24 +818,18 @@ def __get_project_names(df):
811818
812819def __get_list_of_projects (df ):
813820 """
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.
824822 """
825- Get the number of unique projects
826823
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 )
830829
831- return len (df ["project" ].unique ())
830+ return response .json ()
831+ else :
832+ return None
832833
833834
834835def get_projects_treemap (df ):
0 commit comments