I've written one perl script, which compares two vcf files and write output in third file. it is running good with small files, but when i am inputting big files in Gbs, my system becomes slow and it would hang.
I'm using dbSNP vcf file as input which is around 9GB.
Please Suggest me something that will make my perl script run faster. This is my first perl script and i'm new to perl.
Any help would be appreciated !!
Thank you !!!!
open (FILE, "<", "dbSNP_in.vcf") or die "failed to open: $!\n";
my ($chrom, $pos, $id, $ref, $alt, $qual, $filter, $info) = split(/\t/, $_);
push @CHR, $chrom;
push @location, $pos;
push @rs, $id;
push @ref_n, $ref;
push @alt_n, $alt;
open (FILE1, "<", "trial_rs.vcf") or die "failed to open: $!\n";
for ($i=0; $i<@array; $i++)
if (($columns eq $CHR[$i]) and ($columns eq $location[$i]) and ($columns eq $ref_n[$i]) and ($columns eq $alt_n[$i]))
print OUT join("\t", @columns), "\n";