<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>生信菜鸟团 &#187; seqinr</title>
	<atom:link href="http://www.bio-info-trainee.com/tag/seqinr/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bio-info-trainee.com</link>
	<description>欢迎去论坛biotrainee.com留言参与讨论，或者关注同名微信公众号biotrainee</description>
	<lastBuildDate>Sat, 28 Jun 2025 14:30:13 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.33</generator>
	<item>
		<title>实战R语言bioconductor的seqinr包探究人的所有转录本的性质</title>
		<link>http://www.bio-info-trainee.com/777.html</link>
		<comments>http://www.bio-info-trainee.com/777.html#comments</comments>
		<pubDate>Thu, 28 May 2015 02:54:05 +0000</pubDate>
		<dc:creator><![CDATA[ulwvfje]]></dc:creator>
				<category><![CDATA[R]]></category>
		<category><![CDATA[基础数据库]]></category>
		<category><![CDATA[bioconductor]]></category>
		<category><![CDATA[seqinr]]></category>

		<guid isPermaLink="false">http://www.bio-info-trainee.com/?p=777</guid>
		<description><![CDATA[首先安装这个包 source("http://bioconductor.org/ &#8230; <a href="http://www.bio-info-trainee.com/777.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<h3>首先安装这个包</h3>
<p>source("http://bioconductor.org/biocLite.R")</p>
<p>biocLite("seqinr")</p>
<p>然后加载包，并读取我们的CDS.fa文件</p>
<p>library("seqinr")</p>
<p>human_cds=read.fasta("CDS.fa")</p>
<p>#这一个步骤非常耗时间，可能是因为我们的转录本文件有十万多个转录本的原因吧</p>
<p>str(human_cds) #查看可知读入了一个list，其中每个转录本都是list的一个元素</p>
<p>List of 100778</p>
<p>$ ENST00000415118:Class 'SeqFastadna'  atomic [1:8] g a a a ...</p>
<p>.. ..- attr(*, "name")= chr "ENST00000415118"</p>
<p>.. ..- attr(*, "Annot")= chr "&gt;ENST00000415118 havana_ig_gene:known chromosome:GRCh38:14:22438547:22438554:1 gene:ENSG00000223997 gene_biotype:TR_D_gene tran"| __truncated__</p>
<p>$ ENST00000448914:Class 'SeqFastadna'  atomic [1:13] a c t g ...</p>
<p>.. ..- attr(*, "name")= chr "ENST00000448914"</p>
<p>.. ..- attr(*, "Annot")= chr "&gt;ENST00000448914 havana_ig_gene:known chromosome:GRCh38:14:22449113:22449125:1 gene:ENSG00000228985 gene_biotype:TR_D_gene tran"| __truncated__</p>
<p>对list的每个元素都有几种函数可以处理得到信息：</p>
<p>Length,table,GC,count</p>
<p>其中count函数很有趣，数一数序列里面的这些组合出现的次数</p>
<p>count(dengueseq, 1)</p>
<p>count(dengueseq, 2)接下来我们随机取human_cds这个list的一个元素用这几个函数对它处理一下</p>
<p>&gt; tmp=human_cds[[1]]</p>
<p>&gt; tmp</p>
<p>[1] "g" "a" "a" "a" "t" "a" "g" "t"</p>
<p>attr(,"name")</p>
<p>[1] "ENST00000415118"</p>
<p>attr(,"Annot")</p>
<p>[1] "&gt;ENST00000415118 havana_ig_gene:known chromosome:GRCh38:14:22438547:22438554:1 gene:ENSG00000223997 gene_biotype:TR_D_gene transcript_biotype:TR_D_gene"</p>
<p>attr(,"class")</p>
<p>[1] "SeqFastadna"</p>
<p>再看看函数的结果</p>
<p>&gt; length(tmp)</p>
<p>[1] 8</p>
<p>&gt; table(tmp)</p>
<p>tmp</p>
<p>a g t</p>
<p>4 2 2</p>
<p>&gt; GC(tmp)</p>
<p>[1] 0.25</p>
<p>&gt; count(tmp,1)</p>
<p>&nbsp;</p>
<p>a c g t</p>
<p>4 0 2 2</p>
<p>&gt; count(tmp,2)</p>
<p>&nbsp;</p>
<p>aa ac ag at ca cc cg ct ga gc gg gt ta tc tg tt</p>
<p>2  0  1  1  0  0  0  0  1  0  0  1  1  0  0  0</p>
<p>&gt;</p>
<p>还是挺好用的，接下来我们应用R的知识来对着十万多个转录本进行一些简单的总结</p>
<p>human_cds_length=unlist(lapply(human_cds,length))</p>
<p>human_cds_gc=unlist(lapply(human_cds,GC))</p>
<p><b>这样就得到了所有转录本的长度和GC含量信息</b></p>
<p>然后我们简单统计一下，并画几个图表吧！</p>
<p>&gt; summary(human_cds_length)</p>
<p>Min. 1st Qu.  Median    Mean 3rd Qu.    Max.</p>
<p>3     366     699    1132    1425  108000</p>
<p>&gt; summary(human_cds_gc)</p>
<p>Min. 1st Qu.  Median    Mean 3rd Qu.    Max.</p>
<p>0.1467  0.4577  0.5285  0.5264  0.5932  0.8917</p>
<p>可以看到还是有很多很极端的转录本的存在！</p>
<p>最长的转录本也不过10k，而我记得最长的基因高达8M，看了内含子远大于外显子呀。</p>
<p>但是GC含量有很多高于80%，这些基因在二代测序的研究中是一个盲区。</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/05/实战R语言bioconductor的seqinr包探究人的所有转录本的性质2075.png"><img class="alignnone size-full wp-image-778" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/05/实战R语言bioconductor的seqinr包探究人的所有转录本的性质2075.png" alt="实战R语言bioconductor的seqinr包探究人的所有转录本的性质2075" width="554" height="163" /></a></p>
<p>这些极端基因可以通过biomaRt等包进行注释，得到gene名和功能信息。</p>
<p>&nbsp;</p>
<p>hist(human_cds_gc)</p>
<p>hist(log10(human_cds_length))</p>
<p>GC含量分布如图</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/05/实战R语言bioconductor的seqinr包探究人的所有转录本的性质2177.png"><img class="alignnone size-full wp-image-779" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/05/实战R语言bioconductor的seqinr包探究人的所有转录本的性质2177.png" alt="实战R语言bioconductor的seqinr包探究人的所有转录本的性质2177" width="366" height="375" /></a></p>
<p>长度分布如图</p>
<p><a href="http://www.bio-info-trainee.com/wp-content/uploads/2015/05/实战R语言bioconductor的seqinr包探究人的所有转录本的性质2186.png"><img class="alignnone size-full wp-image-780" src="http://www.bio-info-trainee.com/wp-content/uploads/2015/05/实战R语言bioconductor的seqinr包探究人的所有转录本的性质2186.png" alt="实战R语言bioconductor的seqinr包探究人的所有转录本的性质2186" width="375" height="364" /></a></p>
<p>附表：</p>
<p><a href="http://www.bioinformatics.org/sms/iupac.html">http://www.bioinformatics.org/sms/iupac.html</a> 所有字符的碱基氨基酸意义表格</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bio-info-trainee.com/777.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
