这里对 Perl 完全陌生。无论如何,我被分配了一项任务,我在网上找到了一个 perl 模块,它完全符合我的要求。
这是 perl 模块的文档——在 Ext 下有一个叫做 pwmsearch 的文档,它完全符合我的需要。
所以我试着写一个脚本,开始是这样的:
#!/usr/bin/env perl -w
use strict;
use TFBS::Ext::pwmsearch; #this was how the documentation said in synopsis part for pwmsearch so I figured this was how to do it
问题是我无法弄清楚我应该如何将对象传递给 pwmsearch。上面文档中显示的 pwmsearch 的源代码说它需要 $matrixobj 和 $seqobj,我已经将它们存储为文件矩阵和序列。
因此,在搜索了我可以尝试的内容之后,我尝试了以下操作:
pwmsearch('matrix','sequence');
或者
open FILE, 'matrix.txt' or die "Couldn't open file";
$matrix.=<FILE>
close FILE;
open FILE, 'sequence' or die "Couldn't open file";
$seq.=<FILE>
close FILE;
pwmsearch($matrix,$seq)
但是所有这些都使 perl 以各种错误对我咆哮。我做错了什么,我能做些什么来解决它们?