#!/usr/bin/perl -w ######### ### Programed 15_12_02_by Matthew Redden ######### sub check_gene($); sub check_gene_seq($); sub extractseq($$$$); #use strict; mkdir Output; $input = "new_out_again_12_12_02_B_hand_edit_15_12_02.txt"; open (INPUT, "<$input"); while (){ if ($_ =~ /\s{3}\/){ check_gene ($_); } if ($_ =~ /\s{4}\/){ check_gene_seq ($_); $label = "$gene_seq_id.$gene_seq_status.$gene_seq_CDS_number.$gene_seq_number_of_CDSs.$gene_seq_sequence_source.$gene_seq_startpos.$gene_seq_endpos.$gene_seq_startopen.$gene_seq_endopen.$gene_seq_complement"; } extractseq ($label,$gene_seq_sequence_source,$gene_seq_startpos,$gene_seq_endpos); } sub check_gene($) { # my $line = $_; if ($line =~ /\s{3}\/){ $gene_id = $1; $gene_label = $2; } else { print "ERROR. Somebody has altered the regular expression"; } return $gene_id; return $gene_label; } sub check_gene_seq($){ # if ($_ =~ /\s{4}\/){ $gene_seq_id = $1; $gene_seq_status = $2; $gene_seq_CDS_number = $3; $gene_seq_number_of_CDSs = $4; $gene_seq_sequence_source = $5; $gene_seq_startpos = $6; $gene_seq_endpos = $7; $gene_seq_startopen = $8; $gene_seq_endopen = $9; $gene_seq_complement = $10; } else { print "Error. Someone has altered the reguar expression"; } return $gene_seq_id; return $gene_seq_status; return $gene_seq_CDS_number; return $gene_seq_number_of_CDSs; return $gene_seq_sequence_source; return $gene_seq_startpoks; return $gene_seq_endpos; return $gene_seq_startopen; return $gene_seq_endopen; return $gene_seq_complement; } sub extractseq($$$$){ # Pass through the FASTA label, the location of sequence, the start pos and the end pos. $label = $_[0]; $gene_seq_sequence_source = $_[1]; $startpos = $_[2]; $endpos = $_[3]; print "$gene_seq_sequence_source\n"; sleep 1; print "system ('extractseq $gene_seq_sequence_source extracted_seq_$label.txt -regions \"$startpos..$endpos\"')\;"; system ("extractseq $gene_seq_sequence_source extracted_seq_$label.txt -regions \"$startpos..$endpos\""); } The error message I am getting is: Use of uninitialized value in concatenation (.) or string at extract_seqs.pl line 110, line 41. Use of uninitialized value in concatenation (.) or string at extract_seqs.pl line 110, line 41. Use of uninitialized value in concatenation (.) or string at extract_seqs.pl line 110, line 41. Use of uninitialized value in concatenation (.) or string at extract_seqs.pl line 110, line 41. Use of uninitialized value in concatenation (.) or string at extract_seqs.pl line 111, line 41. Use of uninitialized value in concatenation (.) or string at extract_seqs.pl line 111, line 41. Use of uninitialized value in concatenation (.) or string at extract_seqs.pl line 111, line 41. Use of uninitialized value in concatenation (.) or string at extract_seqs.pl line 111, line 41. system ('extractseq extracted_seq_.txt -regions ".."');Extract regions from a sequence Error: failed to open filename extracted_seq_.txt Error: Unable to read sequence 'extracted_seq_.txt'