似乎RNA-Seq的大多数差异基因表达包都是用R.写的.
Examples include:
- edgeR
- limma
- DESeq
Run Code Online (Sandbox Code Playgroud)
是否有任何类似(易于使用)的软件包可用于Python,或者是否已移植任何R软件包?
我能找到的最好的是:
但我真的不想使用rpy2(第一个链接).第二个环节可能就是我要开始的地方,但我首先要确保我不会重新发明轮子.
我需要计算一条线和水平线之间的角度.我的高中数学似乎让我失望了.
import matplotlib.pyplot as plt
import numpy as np
x = [8450.0, 8061.0, 7524.0, 7180.0, 8247.0, 8929.0, 8896.0, 9736.0, 9658.0, 9592.0]
y = range(len(x))
best_fit_line = np.poly1d(np.polyfit(y, x, 1))(y)
slope = (y[-1] - y[0]) / (x[-1] - x[0])
angle = np.arctan(slope)
print 'slope: ' + str(slope)
print 'angle: ' + str(angle)
plt.figure(figsize=(8,6))
plt.plot(x)
plt.plot(best_fit_line, '--', color='r')
plt.show()
Run Code Online (Sandbox Code Playgroud)
结果如下:
slope: 0.00788091068301
angle: 0.00788074753125
Run Code Online (Sandbox Code Playgroud)
我需要水平和红色虚线之间的角度.只要看一下它就应该在30-45度之间.我究竟做错了什么?
*有关slope = (y[-1] - y[0]) / (x[-1] - x[0]),我也尝试过numpy.diff和scipy.stats.linregress,但没有成功,无论是.
我需要生成所有可能的长度在5至15之间的核苷酸组合的列表。
nucleotides = ['A', 'T', 'G', 'C']
Run Code Online (Sandbox Code Playgroud)
预期成绩:
AAAAA
AAAAT
AAAAC
AAAAG
AAATA
AAATT
...
AAAAAAAAAAAAAAA
AAAAAAAAAAAAAAT
etc.
Run Code Online (Sandbox Code Playgroud)
我试过了:
for i in range(5,16):
for j in itertools.permutations(nucleotides, i):
print j
Run Code Online (Sandbox Code Playgroud)
但是,如果这样做是行不通的len(nucleotides) < i。
提前致谢!
python combinations permutation bioinformatics python-itertools
如果使用http://www.barchart.com/historicaldata.php之类的网站,是否可以填写文本框,然后单击“提交”按钮下载数据?
我习惯于urllib下载整个页面,但似乎可以弄清楚如何将文本提交到文本框中,然后单击脚本中的按钮。
python ×4
angle ×1
combinations ×1
html ×1
math ×1
numpy ×1
permutation ×1
r ×1
rpy2 ×1
time-series ×1
urllib ×1