Hi,
I have a list contains:
ID : 741158
PARENT ID : 9605
RANK : species
GC ID : 1
MGC ID : 2
SCIENTIFIC NAME : Homo sp. Altai
GENBANK COMMON NAME : Denisova hominin
//
In some part of this file the rank is subspecies. I just need those ID line (first line) which belong to species not subspecies:
I used this : my @new_list = grep {$_ =~ /\bspecies$/ && /\nID +\: *([\d]+)/} @list;
but is not working. Any suggestion? Thanks
I have a list contains:
ID : 741158
PARENT ID : 9605
RANK : species
GC ID : 1
MGC ID : 2
SCIENTIFIC NAME : Homo sp. Altai
GENBANK COMMON NAME : Denisova hominin
//
In some part of this file the rank is subspecies. I just need those ID line (first line) which belong to species not subspecies:
I used this : my @new_list = grep {$_ =~ /\bspecies$/ && /\nID +\: *([\d]+)/} @list;
but is not working. Any suggestion? Thanks
Comment