perl

从零开始完整学习全基因组测序数据分析: Trimmomatic、SOAPnuke、sickle和seqtk的比较

流过昼夜 提交于 2021-02-13 06:40:16
在第4节开始之前,先来一段插曲。在上一节中,我们说到可以使用Trimmomatic、sickle、seqtk或者SOAPnuke对fastq数据进行过滤。那么也许你会好奇,那他们都有什么特点,都一样好吗或是有哪些差异之处?正所谓,工欲善其事必先利其器,所以这篇文章将会与你一起来解开这几个问题。 因为Trimmomatic的安装已经在 第3节 数据质控 中说的比较清楚了,这里就不再赘述。那么, 先说SOAPnuke的安装,你有两种方式: 第一,确保你的系统中有automake。由于SOAPnuke还使用了多个第三方的c++ 程序库,包括 但不限于 : boost,log4cplus和openssl。因此,需要在你的系统中先安装好这几个库,并修改SOAPnuke代码包的CMakeLists.txt,重新指定里面这几个程序包的路径。同时还需要把上述包的include目录链接到CMakeList.txt中指定的目录(或者你也可以修改到其他目录)下。此外,如果上述三个包的静态库没在默认路径下,那么。。。你还得找到它们,然后修改路径,并涉及到少量代码的修改,再进行编译,然后祈祷。。。至于第三方程序库的安装方法都可以在网上找到。但特别指出一点,建议使用源码安装(特别是log4cplus),防止有些包默认不产生静态链接库。另外,版本不对也会报各种error,包括编译器的error

Vim进入和退出命令

谁都会走 提交于 2021-02-13 05:28:20
本来不想写任何关于 vim的文章的,无奈我今天又忘记怎么退出 vim 了,常用命令是ESC,然后:wq(保存并退出),:q!(不保存并强制退出),i进入vim模式。另外还有其它的,我可能都不会用到。。。 按ESC键 跳到命令模式,然后: :w 保存文件但不退出vi :w file 将修改另外保存到file中,不退出vi :w ! 强制保存,不推出vi :wq 保存文件并退出vi :wq ! 强制保存文件,并退出vi q: 不保存文件,退出vi :q ! 不保存文件,强制退出vi :e ! 放弃所有修改,从上次保存文件开始再编辑 命令历史 以:和/开头的命令都有历史纪录,可以首先键入:或/然后按上下箭头来选择某个历史命令。 启动vim 在命令行窗口中输入以下命令即可 vim 直接启动vim vim filename 打开vim并创建名为filename的文件 文件命令 打开单个文件 vim file 同时打开多个文件 vim file1 file2 file3 ... 在vim窗口中打开一个新文件 :open file 在新窗口中打开文件 :split file 切换到下一个文件 :bn 切换到上一个文件 :bp 查看当前打开的文件列表,当前正在编辑的文件会用[]括起来。 :args 打开远程文件,比如ftp或者share folder :e ftp://192.168.10.76

Swig Perl: wrong ELF class

孤者浪人 提交于 2021-02-11 12:36:31
问题 I am trying to build a Perl module out of a CXX module using Swig. There are multiple guides related to this: The generic Swig tutorial with a Perl section The Swig and C++ guide The Swig and Perl5 guide I'm new to Swig and not very familiar with C(++), but I've been able to compile my module following the tutorial in 1: I created an interface file: %module my_module %{ #include "case.h" #include "case.h" #include "lexindex.h" #include "intlist.h" #include "weight.h" #include "invindex.h"

DBIx::Class and overloading accessors

老子叫甜甜 提交于 2021-02-11 10:46:57
问题 (Similar to, but with more concrete details that, #11526999) My Result Classes have been built using dbicdump , however I wish to overload the default accessor for a date field. Works, but a bodge To hackytest my idea, I simply added an accessor attribute to the created date key of the add_columns call: __PACKAGE__->add_columns( "stamp_id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0, sequence => "timestamp_stamp_id_seq", }, "date", { data_type => "date", is_nullable =>

.pm file that's loaded on every invocation of the perl interpreter?

佐手、 提交于 2021-02-11 07:38:59
问题 I thought I remember reading somewhere about where perl can be configured to automatically load a certain .pm file on start up. I know about PERL5OPT , but to my recollection, this was a specific file that would be loaded if it exists. Is it a compile option that can be set (i.e. via Configure )? 回答1: Reading through perldoc perlrun it looks like you are looking for what is talked about in the -f option: -f Disable executing $Config{sitelib}/sitecustomize.pl at startup. Perl can be built so

perl Data::Dumper to extract key values

冷暖自知 提交于 2021-02-10 22:11:56
问题 I have some perl code which I've written to get weather data/alerts from NOAA. My code is pretty simple: use Weather::NOAA::Alert; use Data::Dumper; $alert = Weather::NOAA::Alert->new(['TXC301']); $events = $alert->get_events(); $alert->poll_events(); print Dumper($events); # @url = (keys %{$VAR1->{'TXC301'}}); # $url = $VAR1->{'TXC301'}; $url = $events->{'TXC301'}; print "URL is $url\n"; # $expires= $events->{'TXC301'}->{$url}->{'expires'}; $expires= $events->{'TXC301'}->{'http://alerts

perl Data::Dumper to extract key values

余生长醉 提交于 2021-02-10 22:11:31
问题 I have some perl code which I've written to get weather data/alerts from NOAA. My code is pretty simple: use Weather::NOAA::Alert; use Data::Dumper; $alert = Weather::NOAA::Alert->new(['TXC301']); $events = $alert->get_events(); $alert->poll_events(); print Dumper($events); # @url = (keys %{$VAR1->{'TXC301'}}); # $url = $VAR1->{'TXC301'}; $url = $events->{'TXC301'}; print "URL is $url\n"; # $expires= $events->{'TXC301'}->{$url}->{'expires'}; $expires= $events->{'TXC301'}->{'http://alerts

perl Data::Dumper to extract key values

好久不见. 提交于 2021-02-10 22:10:56
问题 I have some perl code which I've written to get weather data/alerts from NOAA. My code is pretty simple: use Weather::NOAA::Alert; use Data::Dumper; $alert = Weather::NOAA::Alert->new(['TXC301']); $events = $alert->get_events(); $alert->poll_events(); print Dumper($events); # @url = (keys %{$VAR1->{'TXC301'}}); # $url = $VAR1->{'TXC301'}; $url = $events->{'TXC301'}; print "URL is $url\n"; # $expires= $events->{'TXC301'}->{$url}->{'expires'}; $expires= $events->{'TXC301'}->{'http://alerts

win32 strawberry perl PAR Packer make exe file

*爱你&永不变心* 提交于 2021-02-10 20:26:52
问题 i use on windows server : Summary of my perl5 (revision 5 version 30 subversion 0) configuration PAR::Packer is up to date (1.049). I can successfully build an exe file without error message. pp -o p.exe p.pl content p.pl use warnings; use strict; print "This is the Perl code!\n"; on the local machine run fine. Transfer the exe to other windows host and run script. No output :-( What am I doing wrong? Regards Thomas 来源: https://stackoverflow.com/questions/58817812/win32-strawberry-perl-par

Validating phone number using perl

我的梦境 提交于 2021-02-10 20:18:10
问题 I want to validate phone number with following conditions: length should be 10 digits should start with 7 or 8 or 9 If it does not meet these requirements, we should fail the number. I have tried the following: print "Enter phone number: \n"; $name=<>; chomp $name; if (length($name)==10 && $name==~ m{/[^7-9]/}){ print "$name is valid \n"; } else { print "$name is not valid \n"; } 回答1: I would just use a single regex here: ^[789][0-9]{9}$ This avoids having to spread your validation logic