
perl
little^raccoon
来挖坑咯~~~
展开
-
为不同的conda环境中配置特定的PERL5LIB
为了避免PERL5LIB存在冲突。原创 2024-04-16 20:38:38 · 589 阅读 · 0 评论 -
perl模块相关的命令
perldoc perllocal #查看已安装的模块原创 2021-01-25 17:50:42 · 139 阅读 · 0 评论 -
拟南芥基因注释
Athaliana_447_Araport11.annotation_info.txt文件下载链接 https://phytozome.jgi.doe.gov/pz/portal.html#!bulk?org=Org_Athaliana_er#!/usr/bin/perlmy $infile=shift;my $gene_num=shift;my $outfile=$infile.".annotation.txt";$gene_num-=1;my %anno_hash;$usage="原创 2020-12-01 16:24:52 · 2267 阅读 · 0 评论 -
perl实现根据序列ID从提取fasta文件序列
usage: perl thisScript.pl query.fa gene.lst outfile--------------------------------------------------------------------query.fa 基因组或其他需要从中提取的fasta格式文件gene.lst 需要提取的基因或染色体名字,有无>均可outfile 输出文件#!/bin/perl#unless(@ARGV==3){# die "usage: $0 <inpu.原创 2020-11-12 02:55:42 · 3360 阅读 · 2 评论 -
bed和gff文件按染色体号排序
注释文件通常按照染色体序号升序排列,而有时需要我们对获取的注释文件进行排序。对于chr01这种直接sort就可以,但是对于chr1, chr2… chr11这种,直接sort的结果是chr11排在chr2前面。解决这种情况的方法很简单,提取染色体中的数字,然后使用sort的-n参数就可以。而写成脚本复用起来也比较方便。有些物种染色体命名可能特殊,所以line 24的正则匹配要针对不同情况修改。现在的脚本匹配染色体命名为Chr chr CHR。#!/usr/bin/perl# 2020-11-12.原创 2020-11-12 02:49:21 · 1906 阅读 · 0 评论 -
perl对blast结果bit score进行筛选,保留最大值
while(<>){ chomp; $line=$_; @line=split /\t/,$line; ($name, $score)=@line[0,11]; if(!exists($max{$name})){ push @names,$name; } if(!exists($max{$name})||$s>$max{$name}){ $max{$name...原创 2019-04-03 12:37:15 · 2617 阅读 · 8 评论 -
perl实现序列反向互补
#!/usr/bin/perl -wprint"Input sequence:\n";chomp(my $seq = <STDIN>);$ seq =~ tr/atcguATCGU/tagcaTAGCA/;print “Reverse complement sequence:\n”print scalar reverse $seq;#或者使用下面这种形式输出,因为reve...原创 2019-03-23 00:54:04 · 3560 阅读 · 0 评论 -
perl实现计算GC含量
#!/usr/bin/perl -wunless(@ARGV==2){ die "Usage: perl $0 <input_fasta> <output> error:$!\n";}my($input, $output)=@ARGV;open INPUT, $input;open OUTPUT, ">$output";#===============...原创 2019-03-22 19:22:11 · 2520 阅读 · 0 评论 -
perl根据ID提取序列
#!/usr/bin/perl -wunless(@ARGV==3){ die "Usage: perl $0 <ID_lst> <input_fasta> <output> error:$!\n";}my($lst, $input, $output)=@ARGV;open LST, $lst;open INPUT, $input;open OU...原创 2019-03-21 19:23:11 · 3082 阅读 · 2 评论 -
perl实现去除fasta格式序列换行符
#!/usr/bin/perl -wuse strict;unless (@ARGV==2){ die "Useage: perl $0 <input.fa> <out.length>\n";}my($input,$output) = @ARGV;open INPUT,$input || die "error: can't open file: $input\n...原创 2019-03-20 00:50:56 · 1986 阅读 · 0 评论