自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(110)
  • 收藏
  • 关注

原创 GA后做PLIP(加cu)

cu的相互作用小分子的相互作用CU的相互作用小分子的相互作用

2022-07-08 15:14:31 351 1

原创 AttributeError: module ‘importlib‘ has no attribute ‘util‘

(base) unbuntu@unbuntu-virtual-machine:~/GAligand docking$ python3 /home/unbuntu/rosetta2019/main/source/scripts/python/public/generic_potential/mol2genparams.py -s charge_FSPP.mol2 Traceback (most recent call last): File "/home/unbuntu/rosetta2019/main

2022-05-31 16:52:15 1476 1

转载 Python3 安装pip 提示ModuleNotFoundError: No module named ‘distutils.util‘

sudo apt-get install python3-distutilssudo apt install python3-pip输入pip3 -V就可以查到

2022-02-24 13:29:02 822

转载 ubuntu开机无法进入图形界面

https://blog.csdn.net/sinat_23619409/article/details/85220561?spm=1001.2101.3001.6650.8&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERate-8.pc_relevant_paycolumn_v3&depth_1-utm_source=distribute.pc_relevant.none-task-

2022-02-23 11:10:37 11366

原创 Pymol安装Caver3报错

Plugin“Caver3”has been installed but initialization failed/Unable to initialize plugin ‘Caver3’ (pmg_tk.startup.Caver3).解决:PyMOL>import pmg_tk.startup.Caver3Traceback (most recent call last): File "D:\ProgramData\Anaconda3\Lib\site-packages\pmg_tk

2022-01-10 20:23:16 1645

翻译 Rosetta score

Functionanalytotal_score总加权分数,分数越低,给定蛋白质的结构可能越稳定fa_atr表示不同残基中原子之间的 Lennard-Jones 吸引力潜力的加权分数。这种分解有助于确定哪些能量项比其他能量项贡献更多,即蛋白质中发生了什么样的相互作用。Rosetta 预测残基间范德华力具有最大的稳定作用 ( -423.638)fa_sol溶剂化作用,具有最高的不稳定作用 ( 241.309)fa_rep不同残基原子之间的Lennard-Jones...

2022-01-05 14:52:34 405

原创 windows安装pymol

下载minianaconda输入命令conda install -c conda-forge pymol-open-source如果网络问题关闭防火墙或修改DNS8.8.8.88.8.4.4

2021-12-02 13:43:20 420

原创 生成PSSM矩阵

cdhit90_muscle_trim_round2-remove-gap.fa为cdhit之后的fasta,也可以直接使用下载的fasta序列,无需cdhit,生成cd90_trim_remove_gap一系列文件unbuntu@unbuntu-virtual-machine:~/1funclib/1gsk$ makeblastdb -in cdhit90_muscle_trim_round2-remove-gap.fa -dbtype prot -out cd90_trim_remove_gap生

2021-09-16 21:27:36 228

原创 python读取excle内容是否在另一个excle中,并读取对应值

图1的pdbname包含在图二的description中,并输出表二对应的值另存为一个表格#coding=gbk# import pandas as pd## df = pd.read_excel('F:/1对接/chapter4/8w_双突变/total_B_8w.xlsx')# print(df[df['description']=='01_pos_remove_00B_01_00B_positioned_00884']['interface_delta_B'])# print(df[d..

2021-07-23 15:17:34 751

原创 python通过txt文件将指定文件复制到另一个文件夹

import shutilimport numpy as npdata = []for line in open("test5.txt", "r"): # 设置文件对象并读取每一行文件 data.append(line)# print(data)for a in data: srcfile_path = 'pdbname_list/{}'.format(a[:-1]) print(srcfile_path) tarfile_path = 'targt1'

2021-07-22 20:41:34 2021

转载 python读取文件名

#coding=gbkimport osdef readname(): filePath = 'F:\\1对接\\chapter4\\100pdb\\' name = os.listdir(filePath) return nameif __name__ == "__main__": name = readname() print(name) for i in name: print(i)转自:https://www.jb51

2021-07-22 16:08:42 2015

原创 python实现pdb转fasta

import sysif len(sys.argv) <= 1: print('python pdb2fasta.py desgin_3.txt > desgin_3.fasta') exit()input_file = open(sys.argv[1])letters = {'ALA': 'A', 'ARG': 'R', 'ASN': 'N', 'ASP': 'D', 'CYS': 'C', 'GLU': 'E', 'GLN': 'Q', 'GLY': 'G', '

2021-07-16 15:06:46 1775

原创 社区版pycharm如何创建django

指定自己需要存放的文件夹,创建项目名打开pycharm就可以看到自己创建的目录了

2021-07-10 10:59:53 243

原创 使用Rosetta批量生成fasta

**方法一:(多个fasta汇总在一个文件中)**使用Rosetta将<-11的pose名字放入一个文件中,并对这个文件生成fasta首先创建一个文本文件metric_thresholds.txtreq total_score value < -1010req interface_delta_B value < -11output sortmin interface_delta_B接着筛选出interface_delta_B<-11的pose,生成filtered

2021-07-10 10:48:34 983

原创 python爬虫报错requests.exceptions.MissingSchema: Invalid URL

把开头的#encoding=gbk改为utf-8

2021-07-09 13:40:37 6891

原创 python将fasta格式转为.csv

from Bio import SeqIOimport pandas as pdmeta = []sequence = []label = []i = 0seq = ('fasts.txt') # 转换的文件for seq_record in SeqIO.parse(seq, "fasta"): meta.append(str(seq_record.id)) sequence.append(str(seq_record.seq)) i = 1 + i lab

2021-07-06 10:33:33 565

原创 python绘制散点聚类图及标记序号

# coding=gbkimport pandas as pdimport matplotlib.pyplot as pltfrom sklearn.cluster import KMeans# data = pd.read_excel('lactose-lactuse-scatter.xlsx', engine='openpyxl')# #遍历所有数据# x = data.iloc[:]## #5个簇,1个自由点# mod = KMeans(n_clusters=5, random_s

2021-07-01 14:50:12 1998

原创 python绘制热图

# coding=gbkimport matplotlib.pyplot as pltimport pandas as pdimport seaborn as snsimport numpy as np#结果图编码从0开始,编号依次加一对应蛋白的编号,其中50为m7file_name = pd.read_excel('lactose-lactuse.xlsx',engine='openpyxl')data = file_name.pivot("lactose","lactulose","l

2021-07-01 14:49:34 11045

原创 python绘制直方图

用两列数据绘制直方图#coding=gbkimport xlwings as xwimport pandas as pdimport matplotlib.pyplot as plt#pd.set_option('display.max_columns', None) #解决表格多列时中间省略显示问题#pd.set_option('display.max_rows', None) #解决表格多行时中间省略显示问题#读取excel文件中的数据app = xw.App(visi

2021-07-01 14:48:52 17277

原创 python读取excle数据

file_name = pd.read_excel('lactose-lactuse.xlsx',engine='openpyxl')

2021-06-21 13:30:05 93

原创 Python实现 提取fasta中Homosapiens所在行标题和序列

file_r = open('SwissProt.fasta', 'r')file_w = open('SwissProtHomo.fasta', 'w')seq = ''for line in file_r: if line[0] == '>' and seq == '': header = line elif line[0] != '>': seq = seq+line elif line[0] == '>' and se

2021-04-24 10:49:36 593

原创 python实现 提取gbk文件的登记码和ORIGIN序列

file_r = open("sequence.gbk")file_w = open("sequence.fasta", "w")flag = 0for line in file_r: if line[0:9] == 'ACCESSION': #得到第一个空格和第二个空格之间的内容,[2]:得到第二个空格和第三个空格之间的内容 AC = line.split()[1].strip() # AC = line.split( )[1] file_w.writ

2021-04-23 16:49:00 414

原创 用python 实现从fasta文件中获取登记码

fasta_file = open('SwissProt.fasta', 'r')ac_list = []for line in fasta_file: if line[0] == '>': fields = line.split('|') ac_list.append(fields[1])print(ac_list)结果['Q664P8', 'Q66K14', 'Q8K9I1', 'Q664P8', 'Q66K14', 'Q8E4B4', 'B3

2021-04-21 16:45:58 182 2

原创 用Python实现 获取fasta的头文件

fasta_file = open('SwissProt.fasta', 'r')out_file = open('SwissProt.header', 'w')for line in fasta_file: if line[0:1] == '>': out_file.write(line)out_file.close()fasta:sp|Q664P8|TAUB_YERPS Taurine import ATP-binding protein TauB OS=Y

2021-04-21 16:12:04 466

原创 python生物信息学数据管理第三章自测题

3.1 读取和写入文件将文件读取并存为副本file_r = open('ml.txt', 'r')file_w = open('ml副本.txt', 'w')txt = file_r.read()file_w.write(txt)file_r.close()file_w.close()3.2 计算文件中平均值和标准差并保存到另一个文件import mathfile_r = open('jisuan.txt', 'r')file_w = open('结果.txt', 'w')

2021-04-16 15:57:48 781 1

转载 python中read、readline和readlines的区别

read() : 一次性读取整个文件内容。推荐使用read(size)方法,size越大运行时间越长readline() :每次读取一行内容。内存不够时使用,一般不太用readlines() :一次性读取整个文件内容,并按行返回到list,方便我们遍历一般小文件我们都采用read(),不确定大小你就定个size,大文件就用readlines()1)我们先用read来完整读取一个小文件,代码如下:f = open('test.py', 'r')print(f.read())f.close

2021-04-16 14:06:18 3124

原创 计算标准差和中位数

计算标准差计算标准差:要先算出平均值,—>(value-aver)**2,相加后除以长度,再开平方跟import mathdata = [3.2, 4.5, 2.4, 9.2, 8.3]aver = sum(data) / len(data)total = 0.0for value in data: total +=(value - aver) ** 2pfc = math.sqrt(total/len(data))print(pfc)计算中位数data =

2021-04-16 10:11:17 2784

原创 Python字符串格式化%s%d%f

%s字符串string="hello" #%s打印时结果是hello print "string=%s" % string # output: string=hello #%2s意思是字符串长度为2,当原字符串的长度超过2时,按原长度打印,所以%2s的打印结果还是hello print "string=%2s" % string # output: string=hello #%7s意思是字符串长度为7,当原字符串的长度小于7时,在原字符串左侧补空格, #

2021-04-15 10:45:49 289

原创 Python生物信息学数据管理---第二章自测

insulin = '''MPRAPRCRAVRSLLRSHYREVLPLATFVRRLGPQGWRLVQRGDPAAFRALVAQCLVCVPWDARPPPAAPSFRQVSCLKELVARVLQRLCERGAKNVLAFGFALLDGARGGPPEAFTTSVRSYLPNTVTDALRGSGAWGLLLRRVGDDVLVHLLARCALFVLVAPSCAYQVCGPPLYQLGAATQARPPPHASGPRRRLGCERAWNHSVREAGVPLGLPAPGARRRGGSASRSLPLPKRPR

2021-04-09 11:01:15 672

原创 error while loading shared libraries: libsqlite3.so: cannot open shared object file: No such file or

解决输入 sudo apt-get install libsqlite3-dev

2021-03-30 14:38:49 1713 1

原创 Use ‘sudo apt autoremove‘ to remove it.

解决sudo apt autoremove

2021-03-29 18:30:39 2468 2

原创 matplotlib作图

import numpy as npimport matplotlib.pyplot as mpmp.figure('Figure A', facecolor='gray')mp.title('FigureB', fontsize=16)mp.xlabel('X', fontsize=14)mp.ylabel('Y', fontsize=14)#设置刻度参数 labelsize设置刻度字体大小mp.tick_params(labelsize=10)#设置图表网格线# - or

2021-02-18 17:29:34 98 1

原创 用seaborn作聚类热图

import matplotlib.pyplot as pltimport seaborn as snsimport pandas as pdsns.set()data = pd.read_csv("fs.csv")#print(data.head())flights = data.pivot("month","year","passengers")## 绘制x-y-z的热力图,比如 年-月-销量 的聚类热图g = sns.clustermap(flights, fmt='d', c

2021-02-04 21:20:27 2356 1

原创 用seaborn作热图报错:urllib.error.URLError: <urlopen error [Errno 11004] getaddrinfo failed>

seaborn-data数据下载网址https://codechina.csdn.net/mirrors/mwaskom/seaborn-data?utm_source=csdn_github_acceleratorimport matplotlib.pyplot as pltimport seaborn as snssns.set()#用行和列标签绘制flights_long = sns.load_dataset("flights")flights = flights_long.pivot(

2021-02-04 21:15:29 3219 2

原创 2021-1-5

File: src/core/chemical/ResidueTypeSetCache.cc:106[ ERROR ] UtilityExitExceptionERROR: Error in core::chemical::ResidueTypeSetCache::add_residue_type(): Attempting to add a new residue type, but residue type '00C' already exists in the cache. (Did you l

2021-01-05 17:16:52 254

原创 vHTS注意事项

运行生成js文件的命令与前面的数据库和flag.txt以及xml无关unbuntu@unbuntu-virtual-machine:~/ligand_docking/2_vHTS$ python2.7 /home/unbuntu/rosetta_src_2019.35.60890_bundle/tools/hts_tools/make_evenly_grouped_jobs.py ligand_files/params/ protein_files/ --n_chunks 1 --max_per_job

2021-01-05 16:25:36 222

原创 用一个小分子一个蛋白质运行vHTS

利用教程一的小分子ETQ和蛋白质3PBL_A_ETQ.pdbunbuntu@unbuntu-virtual-machine:~/ligand_docking/2_vHTS$ $ROSETTA/tools/hts_tools/sdf_split_organize.py ligand_files/ETQ_conformers.pdb ligand_files/split_conformers/ ligand_names.csv0 records processedunbuntu@unbuntu-vir

2021-01-05 09:45:06 165 1

原创 vHTS(js)

{ "jobs": [ { "proteins": [ "protein_files/1KV2_cleaned_0001.pdb", "protein_files/1KV2_cleaned_0002.pdb" ], "ligands": [ "ligand_files/params/ac/AU.pdb", "ligand_files/params/a9/AF.pdb", "ligand_files/params/bc/AN.pdb",

2021-01-04 15:22:52 184

原创 对接命令

$ mpirun -np 6 /home/unbuntu/rosetta_src_2019.35.60890_bundle/main/source/bin/rosetta_scripts.mpi.linuxgccrelease @inputs/options -docking:ligand:ligand_ensemble 0 -nstruct 500 $ mpirun -np 6 /home/unbuntu/rosetta_src_2019.35.60890_bundle/main/source/bin

2020-12-01 19:07:24 169

原创 1hzy_Funclib:XML

<ROSETTASCRIPTS>Dock the ensemble of ligand into the native structure using the Rosetta Score based affinities <SCOREFXNS> <ScoreFunction name="ligand_soft_rep" weights="ligand_soft_rep"> <Reweight scoretype="fa_elec" weight="0

2020-12-01 18:10:36 156

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除