Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Write a script which can calculate the degree and clustering coefficient for every node (protein) in the human protein interaction network (attached). Now calculate the average clustering coefficient...

1 answer below »
Write a script which can calculate the degree and clustering coefficient for every node (protein) in the human protein interaction network (attached). Now calculate the average clustering coefficient of the network. Finally, test whether the network has a scale-free structure by plotting the degree distribution ?• Now write another script that can calculate the shortest path lengths between every pair of nodes (proteins) in the attached files (two files are attached). Compare the path length distributions between the two protein sets using a wilcox test.
(I want only the pyhton code separately)
Answered Same Day Apr 23, 2021

Solution

Pushpendra answered on Apr 26 2021
156 Votes
import pandas as pd
import numpy as np
import networkx as nx
df=pd.read_csv("human-ppi-f3nmocg5.txt")
df=pd.DataFrame(np.a
ay(df))
data_list=[]
for i in range(df.shape[0]):
data=df.iloc[i][0].split('\t')
data_list.append(data)
nodes=[]
for i in range(len(data_list)):
if(nodes.count(data_list[i][0])==0):
nodes.append(data_list[i][0])
if(nodes.count(data_list[i][1])==0):
nodes.append(data_list[i][1])
edges={}
for i in range(len(nodes)):
edges[nodes[i]]=[]
for i in range(len(data_list)):
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here