Assalam o alaikum everyone
I have to write a perl script which extract genes information from annotation files (gff). I have gff files of different genomes downloaded from NCBI and two txt files 1 of them contains full path of gff files and 2nd contains list of genes which information have to extract from annotation files.. Actually i have extracted this information through grep command but now i have to write a perl script for this I'm newin perl kindly guide me how to do so ????
Thanks in advance :)
$ cat annotation_files_path
~/home/usr/NCBI_Mammals_genomes/Nine_banded_armadillo/
~/home/usr/NCBI_Mammals_genomes/Noth_American_deer_mouse/
~/home/usr/NCBI_Mammals_genomes/Northern_mole_vole/
$ cat Genes_list
acmsd
smo
amy2b
Since you say you 'have' to write a perl script, have you tried any code? No one should write something for you if this is homework. That's not the purpose of this site. However, if you post a snippet of your code with an error message that you're having trouble with, someone can give you helpful hints.
if you have to write perl code, then below perl code by Alex may work. If you are a bioinformatician, you can use perl module for intersection: http://search.cpan.org/~cjfields/BioPerl-Run/lib/Bio/Tools/Run/BEDTools.pm