摘要: ``` #!/usr/bin/perl -w use strict; use Getopt::Long; use Bio::SeqIO; my %opts; GetOptions(\%opts, "i=s", "o=s"); if (!(defined $opts{i} && defined $opts{o})){ print "\n"; &usage; }... 阅读全文
posted @ 2015-12-10 15:21 liuhui_pine 阅读(1645) 评论(0) 推荐(0)
摘要: 转自 http://www.yelinsky.com/blog/archives/278.html 稍有修改 默认位点为“CCGG”。其他位点分析可修改脚本中的 my $site = ‘CCGG';和 my $n = 2; 阅读全文
posted @ 2015-12-07 12:51 liuhui_pine 阅读(1222) 评论(0) 推荐(0)
摘要: ``` while () { } # will read from standard input one line at a time foreach () { } # will read everything from standard input before looping ``` 阅读全文
posted @ 2015-12-07 11:03 liuhui_pine 阅读(116) 评论(0) 推荐(0)
摘要: ``` cp four_letter four_letter_bk for i in do cd /media/10TB/Stats/Assembly_marker/${i} v= mv fasta ${v}.fasta sed i '1,1d' /media/10TB/Stats/index... 阅读全文
posted @ 2015-12-06 21:47 liuhui_pine 阅读(94) 评论(0) 推荐(0)
摘要: ``` #!/usr/bin/perl -w @students = qw/Doreen Oskar Elin Sangeet Malin/; &next_student; &next_student; sub next_student { $i++; print "the next student is $students[$i]\n"; } ```... 阅读全文
posted @ 2015-12-06 21:33 liuhui_pine 阅读(103) 评论(0) 推荐(0)
摘要: 默认状态下,很显然都是用\n来区分行,\n也被我们称作为换行符。当读取序列时,按行来读取时,就是以换行符为标准。 perl中”行“的概念就由$/决定。 $data的值就是”this". 阅读全文
posted @ 2015-12-05 21:51 liuhui_pine 阅读(845) 评论(0) 推荐(0)
摘要: 转自 http://bnuzhutao.cn/archives/901 一般 R 语言的书籍上,介绍安装 R 包的方法都是这样的: 一般而言这不会成功,因为它默认会安装到系统目录下面,而普通用户在这个目录里并没有写入的权限。 因此,需要在 install.packages 这个函数里面指定安装的... 阅读全文
posted @ 2015-12-05 09:50 liuhui_pine 阅读(830) 评论(0) 推荐(0)
摘要: ``` cut -d " " -f 1 sequences.fa | tr -s "\n" "\t"| sed -s 's/>/\n/g' > sequences.tab while read id start end; do \ g=$(grep "$id" sequences.tab | cut -f 2 | cut -c $start-$end);\ echo ">$id";\ echo ... 阅读全文
posted @ 2015-12-04 16:52 liuhui_pine 阅读(234) 评论(0) 推荐(0)
摘要: 已经去除接头(adapter) 阅读全文
posted @ 2015-11-24 13:50 liuhui_pine 阅读(330) 评论(0) 推荐(0)
摘要: ``` !/bin/bash usage() { echo " "; echo " "; echo " "; printf " "; echo "Usage: ./ i input.fa o out.fa" echo " "; echo " "; echo " "; exit 1 } [ $... 阅读全文
posted @ 2015-11-23 11:18 liuhui_pine 阅读(213) 评论(0) 推荐(0)