资源简介
深度学习(SPOT-RNA)
代码片段和文件信息
import tensorflow as tf
import numpy as np
import os
from tqdm import tqdm
import argparse
from utils import create_tfr_files prob_to_secondary_structure
import time
start = time.time()
from argparse import RawTextHelpFormatter
parser = argparse.ArgumentParser()
parser.add_argument(‘--inputs‘ default=‘sample_inputs/2zzm-B.fasta‘ type=str help=‘Path to input file in fasta format accept multiple sequences as well in fasta format; default = ‘‘sample_inputs/2zzm-1-B.fasta‘‘\n‘ metavar=‘‘)
parser.add_argument(‘--outputs‘default=‘outputs/‘ type=str help=‘Path to output files; SPOT-RNA outputs at least three files .ct .bpseq and .prob files; default = ‘‘outputs/\n‘ metavar=‘‘)
parser.add_argument(‘--gpu‘ default=-1 type=int help=‘To run on GPU specifiy GPU number. If only one GPU in computer specifiy 0; default = -1 (no GPU)\n‘ metavar=‘‘)
parser.add_argument(‘--plots‘default=False type=bool help=‘Set this to “True“ to get the 2D plots of predicted secondary structure by SPOT-RNA; default = False\n‘ metavar=‘‘)
parser.add_argument(‘--motifs‘default=False type=bool help=‘Set this to “True“ to get the motifs of predicted secondary structure by SPOT-RNA; default = False\n‘ metavar=‘‘)
#parser.add_argument(‘--NC‘default=True type=bool help=‘Set this to “False“ to predict only canonical pairs; default = True\n‘ metavar=‘‘)
args = parser.parse_args()
os.environ[‘TF_CPP_MIN_LOG_LEVEL‘] = ‘3‘
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
create_tfr_files(args.inputs)
with open(args.inputs) as file:
input_data = [line.strip() for line in file.read().splitlines() if line.strip()]
count = int(len(input_data)/2)
ids = [input_data[2*i].replace(“>“ ““) for i in range(count)]
sequences = {}
for iI in enumerate(ids):
sequences[I] = input_data[2*i+1].replace(“ “ ““).replace(“T“ “U“).upper()
os.environ[“CUDA_VISIBLE_DEVICES“]= str(args.gpu)
#os.environ[‘TF_CPP_MIN_LOG_LEVEL‘] = ‘3‘
NUM_MODELS = 5
test_loc = [“input_tfr_files/test_data.tfrecords“]
outputs = {}
mask = {}
def sigmoid(x):
return 1/(1+np.exp(-np.array(x dtype=np.float128)))
for MODEL in range(NUM_MODELS):
config = tf.compat.v1.ConfigProto()
#config.gpu_options.allow_growth = True
config.allow_soft_placement=True
config.log_device_placement=False
#session_conf = tf.ConfigProto(intra_op_parallelism_threads=1 inter_op_parallelism_threads=1)
#sess = tf.Session(config=session_conf)
print(‘\nPredicting for SPOT-RNA model ‘+str(MODEL))
with tf.compat.v1.Session(config=config) as sess:
saver = tf.compat.v1.train.import_meta_graph(‘SPOT-RNA-models‘+‘/model‘+str(MODEL)+‘.meta‘)
saver.restore(sess‘SPOT-RNA-models‘+‘/model‘+str(MODEL))
graph = tf.compat.v1.get_default_graph()
init_test = graph.get_operation_by_name(‘make_initializer_2‘)
tmp_out = graph.get_tensor_by_name(‘output_FC/fully_connected/BiasAdd:0‘)
name_tensor = graph.get_tensor_by_name(‘tensors_2/componen
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-03-05 00:34 SPOT-RNA-master\
文件 16725 2020-03-05 00:34 SPOT-RNA-master\LICENSE
文件 8845 2020-03-05 00:34 SPOT-RNA-master\README.md
文件 1217434 2020-03-05 00:34 SPOT-RNA-master\SPOT-RNA-architecture.png
文件 4188 2020-03-05 00:34 SPOT-RNA-master\SPOT-RNA.py
文件 695802 2020-03-05 00:34 SPOT-RNA-master\VARNAv3-93.jar
目录 0 2020-03-05 00:34 SPOT-RNA-master\__pycache__\
文件 13869 2020-03-05 00:34 SPOT-RNA-master\__pycache__\utils.cpython-35.pyc
文件 12314 2020-03-05 00:34 SPOT-RNA-master\__pycache__\utils.cpython-36.pyc
目录 0 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\
文件 3229 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\README
目录 0 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\Segment Graphs\
文件 787 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\Segment Graphs\SegmentGraph_README
文件 553 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\Segment Graphs\bpRNA_PDB_650.bpseq
文件 8361 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\Segment Graphs\bpRNA_PDB_650_PKGraph.svg
文件 10976 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\Segment Graphs\bpRNA_PDB_650_all_SegGraph.svg
文件 3916 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\Segment Graphs\bpRNA_PDB_650_pkf_SegGraph.svg
文件 1603 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\Segment Graphs\bpRNA_RFAM_34891.bpseq
文件 2596 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\Segment Graphs\bpRNA_RFAM_34891_PKGraph.svg
文件 7495 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\Segment Graphs\bpRNA_RFAM_34891_all_SegGraph.svg
文件 5785 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\Segment Graphs\bpRNA_RFAM_34891_pkf_SegGraph.svg
文件 36467 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\Segment Graphs\drawSegmentGraphs.pl
文件 46704 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\bpRNA.pl
目录 0 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\bpRNA_1m\
文件 5131 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\bpRNA_1m\Create_bpRNA_1m.zip
文件 161020 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\bpRNA_1m\bpRNA_1m_Databa
文件 851 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\bpRNA_1m\bpRNA_1m_README
文件 1826 2020-03-05 00:34 SPOT-RNA-master\bpRNA-master\bpRNA_PDB_650.st
目录 0 2020-03-05 00:34 SPOT-RNA-master\input_tfr_files\
文件 623256 2020-03-05 00:34 SPOT-RNA-master\input_tfr_files\test_data.tfrecords
目录 0 2020-03-05 00:34 SPOT-RNA-master\outputs\
............此处省略6个文件信息
- 上一篇:教孩子学编程源码
- 下一篇:Python新手入门详细教程(网盘)
相关资源
- 机器学习k means算法实现图像分割
- python数据类型学习思维导图
- kmeans聚类算法的python实现程序
- Python100经典练习题
- 南瓜书(PumpkinBook)
- 深度学习YOLOv3分类算法
- 机器学习numpy和pandas基础
- Python学习全系列教程永久可用
- python机器学习Sebastian Raschka中文最新完
- Python-DeepMoji模型的pyTorch实现
- Deep Learning Cookbook_ practical recipes to g
- 《机器学习实战》源代码Python3
- 深度学习视频中的行为识别
- Python-使用DeepFakes实现YouTube视频自动换
- deep learning with python 中文版
- Introduction to machine learning with python (
- python新浪微博爬虫,爬取微博和用户
- 渗透测试学习资料
- 测试工程师相关学习视频(包含pyth
- Python-一系列高品质的动漫人脸数据集
- Python-Insightface人脸检测识别的最小化
- 非线性回归Python代码
- 093 2018北风网人工智能视频(完结)转
- python的色情图片识别
- 小甲鱼-零基础入门学习Python.pdf
- 贝叶斯网络程序
- K-SVD稀疏字典学习去噪
- 吴恩达深度学习超参数调制完整程序
- 《机器学习实战》Python3代码
- Python3学习笔记
评论
共有 条评论