Keep networks stored on GitHub but accessible to the users through the package as follows:
import pandas as pd
def load_csv_from_github(url):
"""
Load a CSV file from a public GitHub repository.
Args:
url (str): The URL of the CSV file on GitHub.
Returns:
pandas.DataFrame: The loaded CSV data as a DataFrame.
"""
try:
# Read the CSV file from the provided URL
df = pd.read_csv(url)
return df
except Exception as e:
print("An error occurred:", e)
return None
# Example usage:
url = "https://raw.githubusercontent.com/username/repository/branch/filename.csv"
data = load_csv_from_github(url)
if data is not None:
print(data.head()) # Display the first few rows of the loaded data
It would be very convenient for users I think if they could do pyviper.load.p_____(celltype, tissue) and immediately get a tissue-specific celltype network of their choosing
Keep networks stored on GitHub but accessible to the users through the package as follows: