我有下面的 .gtf 文件,我只需要提取 4 个变量(染色体、开始/停止密码子和转录本 id
1 Cufflinks transcript 11869 14412 1000 + . gene_id "CUFF.1"; transcript_id "CUFF.1.2"; FPKM "0.3750000000"; frac "0.000000"; conf_lo "0.375000"; conf_hi "0.375000"; cov "1.470346"; full_read_support "yes";
1 Cufflinks transcript 11869 14412 444 + . gene_id "CUFF.1"; transcript_id "CUFF.1.3"; FPKM "0.1666666667"; frac "0.000000"; conf_lo "0.166667"; conf_hi "0.166667"; cov "0.653487"; full_read_support "yes";
2 Cufflinks transcript 11869 14412 333 + . gene_id "CUFF.1"; transcript_id "CUFF.1.4"; FPKM "0.1250000000"; frac "0.000000"; conf_lo "0.125000"; conf_hi "0.125000"; cov "0.490115"; full_read_support "yes";**
我的问题是脚本如何知道在选定的文件上工作?
你用过:
(1)my $file = 'transcripts_selected.gtf'
(2) 这个脚本也可以用来提取切片数据:
say $data->{"chromosome_number"}->{"start_codon"}->{"stop_codon"}->{"transcript_id"};
或应该:
BioSeq->new(-chromosome_number, -start_codon...)
使用方法?
(3) 最后,这个脚本取自 BioperlHOWTO:
my $seq_in = Bio::SeqIO->new( -file => "<$infile", -format => $infileformat,);
my $seq_out = Bio::SeqIO->new( -file => ">$outfile", -format => $outfileformat,);
while (my $inseq = $seq_in->next_seq) {$seq_out->write_seq($inseq);
- 哪里说变量 $infile/$outfile 应该把 .gtf 文件的名称放在这里,用所选数据的新文件的名称替换 $outfile?