自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

学术程稻属

生物信息和作物基因组学

  • 博客(57)
  • 收藏
  • 关注

原创 awk命令将一个文本内容逐行追加到另一文本行末

使用 awk 命令将一个文本文件每行的内容追加到另一个文本文件的对应行的末尾。

2024-06-29 16:52:54 223

原创 生信步骤|Orthofinder寻找直系同源基因

在探究功能基因的时候,我们经常需要对所研究的基因/蛋白质进行聚类分组,逐个类群探究蛋白功能。创建同源群可以采用Otrhofinder软件,该软件安装方便,运行快速,调用简单,可以说是构建同源群的神器。从OrthoFinder2.4.0版本开始,同源群的划分给予有根树的层次,这种划分方法比依靠相似度要更加准确。

2024-01-12 19:25:10 1432

原创 Rosalind Java|Speeding Up Motif Finding

Rosalind编程问题之计算错误矩阵(failure array)输出前后缀检索匹配。

2024-01-12 19:05:11 529

原创 生信步骤|EffectorP批量预测病原物效应子

EffectorP软件利用机器学习原理,通过事先收集已知的效应子制备训练集,从而实现病原真菌和卵菌的效应子预测。最初在16年发表于NEW PHYTOLOGIST,实现了机器学习初步预测效应子。在18年发表于MPP,采用了更大的训练集和模型集成的方法,准确度更高。在22年发表于MPMI,是目前最新的版本。其实现了效应子的空间定位预测,同时新增了对卵菌效应子的预测。EffectorP3.0正训练集采用64个质外体效应子(50个真菌效应子,14个卵菌效应子)和112个胞质效应子(77真菌,35卵菌)构成。

2023-05-15 12:07:08 731 1

原创 生信步骤|原核生物基因组注释--Prokka

全基因组注释是鉴定生物基因组特征的过程。Prokka是一个适用于原核生物基因组注释工具,可以注释细菌,古菌和病毒基因组。Prokka在预测基因组CDS区域时采用了多种数据库,内置的三个核心数据库包括ISfinder数据库,NCBI细菌抗性数据库和UniprotKB数据库。此外,prokka内置基因CDS预测工具prodigal引用量较高,是目前十分可靠的原核生物基因组快速注释工具。

2023-05-14 21:13:42 1505

原创 生信步骤|MAFFT结合HMMER进行多序列比对和基于隐马模型的基因搜索

蛋白质都是由相似的小型结构域组成的。如果我们有若干个已知的蛋白序列,那我们就可以根据这些蛋白序列比较其含有的保守域,寻找在蛋白数据库中上是否也有一样保守域的蛋白。而后根据统计学模型,将显著性较高的蛋白序列预测为同一类基因家族蛋白。随着蛋白质数据库的日趋完善,使用蛋白质结构域进行序列比对相比起传统的序列全长比对更具优势。对于每个蛋白质家族,通常有数千个已知的同源蛋白可以比对成较深的多重序列。序列比对揭示了一种特定于该结构域的结构和功能的进化模式(profile)。这些模式可以用概率模型捕捉到。

2022-11-19 11:22:28 3197 1

原创 生信步骤|转录组mRNA数据的有参组装

转录组的组装能够提供丰富的组学信息,是生物信息学中重要的基础步骤。测序的下机数据经过过滤,比对,排序,组装,最终得到转录本的全部序列信息。下面我们以稻瘟菌测序数据SRR081556作为例子演示转录组组装的过程。

2022-11-04 17:02:32 2614

原创 Rosalind Java|Matching Random Motifs

Rosalind编程问题之计算随机序列出现并匹配待比对序列的概率。跟有异曲同工之妙。

2022-10-05 22:52:37 522

原创 生信步骤|kmc+genomescope进行基因组调查

在组装未知基因组时,往往需要利用重测序数据提前进行基因组调查,以获取其基因组规模,杂合率,重复序列比例,GC含量等信息。从而更好地拟定后继测序策略。

2022-09-14 10:04:20 2883 3

原创 Rosalind Java|Introduction to Set Operations

Rosalind编程问题之集合操作。题不难,但是格式处理繁琐。

2022-07-25 15:40:53 224

原创 Rosalind Java|Introduction to Random Strings

Rosalind编程问题之计算随机序列出现概率的公共对数。这道题让小编想起了被GRE支配的恐惧,能看懂你就会做。

2022-07-14 14:07:17 192

原创 Rosalind Java|Genome Assembly as Shortest Superstring

Rosalind编程问题之基因组reads组装。终于来到基因组装部分了~这里分享最简单的组装逻辑之一,即根据重叠序列左右延伸出最长序列。Problem:For a collection of strings, a larger string containing every one of the smaller strings as a substring is called a superstring.By the assumption of parsimony, a shortest possib

2022-07-07 16:58:08 209

原创 Rosalind Java|Longest Increasing Subsequence动态规划算法

Rosalind编程问题之计算集合中最长的递增元素子集。Problem:A subsequence of a permutation is a collection of elements of the permutation in the order that they appear. For example, (5, 3, 4) is a subsequence of (5, 1, 3, 4, 2).A subsequence is increasing if the elements of the

2022-06-22 20:40:30 143

原创 Java动态规划算法求解最大子数和问题

动态规划算法是求解决策最优解的重要算法。当我们遇到多阶段决策问题时,即某一阶段的决策会影响下一阶段的决策,动态规划算法能够形成一个决策序列,进而确定整个活动所执行的行动路线。而其中每一阶段的决策都依赖于上一步的决策,同时也影响着下一步的决策,故称动态规划。最大子数和问题如下:给定一个整数数组,找到一个具有最大连续子数和,返回其最大值。举个栗子,{1,-1,-2,2,3,4,5,6,-3}是一个整数型数组,1,-1,-2三个数是一个连续子数,但是这仨的和明显不如2,3,4,5,6这个连续子数和要大。...

2022-06-21 16:05:56 583

原创 Java读取空格分隔的数值并输出为数值类型的数组

数据格式的读取和转换是数据处理中经常遇到的问题。这里分享小编近期遇到的问题。

2022-06-15 19:17:02 2776

原创 Rosalind Java|Counting Phylogenetic Ancestors

Rosalind编程问题之计算祖先数。Counting Phylogenetic AncestorsProblem:Even though a binary tree can include nodes having degree 2, an unrooted binary tree is defined more specifically: all internal nodes have degree 3. In turn, a rooted binary tree is such that onl

2022-05-23 17:19:09 154

原创 Rosalind Java|Locating Restriction Sites

Rosalind编程问题之检索限制性位点。Locating Restriction SitesProblem:A DNA string is a reverse palindrome if it is equal to its reverse complement. For instance, GCATGC is a reverse palindrome because its reverse complement is GCATGC. See Figure 2.Given: A DNA s

2022-05-22 20:39:30 165

原创 Rosalind Java|Consensus and Profile

Rosalind编程问题之统计多个序列中profile矩阵和consensus。Consensus and ProfileProblem:A matrix is a rectangular table of values divided into rows and columns. An m×n matrix has m rows and n columns. Given a matrix A, we write Ai,j to indicate the value found at the inte

2022-05-22 11:32:20 141

原创 Rosalind Java|Counting Subsets

Rosalind编程问题之计算集合的所有子集数。Counting SubsetsProblem:As illustrated in the biological introduction, we can use subsets to represent the collection of taxa possessing a character. However, the number of applications is endless; for example, an event in probab

2022-05-22 09:41:29 91

原创 Boyer-Moore算法增强遍历DNA motif

Boyer-Moore遍历算法在基因组学领域,我们经常需要在海量的DNA数据库中进行motif的比对。在Rosalind问题中,小编曾经分享过一道寻找DNA motif的问题,详情可以回顾这篇博文:Finding a Motif in DNA。问题本身并不难,原文中使用一个for循环即可实现模式串(motif)的遍历。for循环遍历示意图如下:程序员写完很高兴,电脑要是会说话可就要抗议了。傻瓜式遍历带来的运算负荷在进行大规模计算任务时会急剧攀升。看似简单的逻辑背后其实有很大的提升空间。在这里我们介绍B

2022-05-21 10:34:58 249

原创 Rosalind Java|Completing a Tree

“As buds give rise by growth to fresh buds, and these, if vigorous, branch out and overtop on all sides many a feebler branch, so by generation I believe it has been with the great Tree of Life, which fills with its dead and broken branches the crust of t.

2022-05-20 18:45:02 217

原创 Rosalind Java|k-Mer Composition

Rosalind编程问题之统计DNA序列上由ACTG组成的K(4)-mers出现的次数。k-Mer CompositionProblem:For a fixed positive integer k, order all possible k-mers taken from an underlying alphabet lexicographically.Then the k-mer composition of a string s can be represented by an array A

2022-05-20 10:10:33 134

原创 Rosalind Java|Finding a Spliced Motif

Rosalind编程问题之查找两个序列由内含子分隔的共有motif。Ordering Strings of Varying Length LexicographicallyProblem:A subsequence of a string is a collection of symbols contained in order (though not necessarily contiguously) in the string (e.g., ACG is a subsequence of TATG

2022-05-19 09:47:27 216

原创 Rosalind Python|Finding a Protein Motif

Rosalind编程问题之online数据库实现蛋白质序列查找motif。Finding a Protein MotifProblem:To allow for the presence of its varying forms, a protein motif is represented by a shorthand as follows: [XY] means “either X or Y” and {X} means “any amino acid except X.” For example

2022-05-18 17:18:57 344 2

原创 Rosalind Java|Ordering Strings of Varying Length Lexicographically

Rosalind编程问题之枚举字母的全部组合。与上一个问题有异曲同工之妙:Rosalind Java|Enumerating k-mers Lexicographically思路上可以一定程度借鉴这一篇博客。Ordering Strings of Varying Length LexicographicallyProblem:Say that we have strings s=s1s2⋯sm and t=t1t2⋯tn with m<n. Consider the substring t′

2022-05-18 10:16:18 84

原创 Rosalind Java|Enumerating k-mers Lexicographically

Rosalind编程问题之排列组合字母的K-mers。Enumerating k-mers LexicographicallyProblem:Assume that an alphabet A has a predetermined order; that is, we write the alphabet as a permutation A=(a1,a2,…,ak), where a1<a2<⋯<ak. For instance, the English alphabet is

2022-05-17 12:04:51 195

原创 Rosalind Java|Overlap Graphs

Rosalind编程问题之查找重叠区段。Overlap GraphsProblem:A graph whose nodes have all been labeled can be represented by an adjacency list, in which each row of the list contains the two node labels corresponding to a unique edge.A directed graph (or digraph) is a gr

2022-05-16 22:57:12 190

原创 Rosalind Java|Partial Permutations

Rosalind编程问题之部分排列。Partial PermutationsGiven: Positive integers n and k such that 100≥n>0 and 10≥k>0Sample input:21 7Return: The total number of partial permutations P(n,k), modulo 1,000,000Sample output:51200题目大意很容易理解:从一个含有n个数字的集合

2022-05-13 15:10:25 150

原创 Rosalind Python|Inferring mRNA from Protein

Python| Inferring mRNA from Protein在上一章,小编分享了Rosalind的一套题目:Rosalind Java|Inferring mRNA from Protein。其题目大意如下:给出一段蛋白质序列,求其可能的mRNA数量,并将其取余数(mod)。实现思路如下:1.获取整条蛋白质序列,并分别获得其单独的氨基酸字符。2.单个氨基酸对应其mRNA密码子个数,并做累乘。3.累乘完全部氨基酸对应mRNA密码子个数后,考虑3个终止密码子的影响。在博客之后留下了一个

2022-05-02 11:07:34 169

原创 Rosalind Java|Inferring mRNA from Protein

Rosalind编程问题之从蛋白序列推断可能的mRNA序列个数(并取余)。Inferring mRNA from ProteinGiven: A protein string of length at most 1000 aa.Sample input:MAReturn: The total number of different RNA strings from which the protein could have been translated, modulo 1,000,000.

2022-05-01 12:21:07 730

原创 Rosalind Java|Calculating Expected Offspring

Rosalind编程问题之计算杂交后代显性基因携带个体期望值。Calculating Expected OffspringGiven: Six nonnegative integers, each of which does not exceed 20,000. The integers correspond to the number of couples in a population possessing each genotype pairing for a given factor. In

2022-04-25 13:21:49 216

原创 Java计算连续自交杂合概率代系变化

结合两个事件发生的概率,则在第k代家族至少有n个AaBb个体的概率为:P(X>=n)=1-[Cn2^k * (1/2k)n次方 *(1-(1/2k))2的k次方-n)]

2022-04-20 11:30:41 232

原创 Rosalind Java|Independent Alleles

Rosalind编程问题之计算等位基因杂合子比例。Independent AllelesProblemTwo events A and B are independent if Pr(A and B) is equal to Pr(A)×Pr(B). In other words, the events do not influence each other, so that we may simply calculate each of the individual probabilities se

2022-04-19 20:50:04 408

原创 comparable接口实现插入排序

插入排序原理:实现数组元素顺序排列的方法之一。插入排序在每次遍历时,把所有的元素分为两组,已排序的和未排序的;找到未排序组中的一个元素,向已经排序的组中插入;倒叙遍历已经排序的元素,依次和插入元素进行比较,直到找到一个元素小于待插入的元素,就把这个元素放到这个位置,其他元素向后移动一位有了前面两个排序的实现基础,我们直接上代码:public class Insertion { // 1.对数组内元素进行排序 public static void sort(Comparable[

2022-04-14 11:36:37 940

原创 comparable接口实现选择排序

选择排序原理:实现数组元素顺序排列的方法之一。冒泡排序在每次遍历时,假定第一个引索处的元素是最小值。使第一个元素和其他索引处的值依次比较,如果首位索引处的值大于其他索引处的值,则假定其他索引处的值为最小值,直到找到最小值所在的索引。交换最小值索引和第一个索引处的元素。对于n个元素的数组,选择排序每执行一次都会将一个元素放在最小值的位置上(首位)。待比对的元素随着选择排序的进行而递减,每执行一轮选择排序,待比对的元素都会减少一个。此处通过comparable实现选择排序。首先要撰写选择排序的API。

2022-04-12 17:16:23 805

原创 comparable接口实现冒泡排序

Comparable接口实现冒泡排序在编程过程中,排序是重要的需求之一,比如查询订单,按照订单日期排序,查询基因索引号等等。在这个章节中,小编会记录常见的一些排序算法,并且通过API进行实现。冒泡排序原理:比较相邻元素,如果前一个元素比后面的大,则交换这两个元素位置。对每一对相邻元素做同样工作,从开始第一对元素到结尾的最后一对元素,最后得到的位置就是最大值。Comparable接口:对元素机芯比较的API,用来定义排序规则的JAVA接口。后面的代码主要重写的是其中的compareTo方法。此处

2022-04-09 22:30:00 535

原创 Rosalind Java| Transitions and Transversions

Transitions and TransversionsProblemFor DNA strings s1 and s2 having the same length, their transition/transversion ratio R(s1,s2) is the ratio of the total number of transitions to the total number of transversions, where symbol substitutions are inferr

2022-04-06 17:22:40 401

原创 Rosalind Java| Computing GC Content

Rosalind编程问题之计算GC含量。Computing GC ContentProblemThe GC-content of a DNA string is given by the percentage of symbols in the string that are ‘C’ or ‘G’. For example, the GC-content of “AGCTATAG” is 37.5%. Note that the reverse complement of any DNA string

2022-03-24 11:12:10 229

原创 解决Java逐行读取带有行缩进的fasta文件

在生物信息领域读取fasta文件是重要的序列信息储存载体,分为开头注释和序列信息两部分。在上一篇博客中,小编已经分享了Java读取fasta文件的方法。详情请见:Java逐行读取fasta文件上面提到的方法是通过逐行读取源文件,因此可以有效区分标签和序列。但是实际使用的时候由于fasta文件的来源网站不同,其源文件中会出现序列带有换行符的情况(如下图,其实每一段序列中间的每一行末尾都有“\n”分隔),这样的情况下用刚刚的代码就不灵了(一段序列会被逐行读取成多段序列)。我们需要进行一些预处理。方法1:

2022-03-23 11:53:30 1879

原创 Java逐行读取fasta文件

Fasta文件是生物信息领域储存核酸和氨基酸序列最常用的文件格式之一。其基本形式由带“>”的序列注释标签和单个字母表示的核酸或者氨基酸组成。在利用Rosalind学习java生物信息编程时,经常需要读取fasta文件。之前读取此类文件,采用的是读取后转化为字符串形式进行输出和后继处理,读取fasta文件的原代码如下: //定义方法,输入文本文件路径,以字符串类型返回文本内容 public static String readFileContent(String fileName) {

2022-03-22 18:08:11 331

空空如也

空空如也

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

TA关注的人

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