Need help to write a Perl one liner for an input file that is slightly different frmo the one descried at the URL: http://bioinf.uni-greifswald.de/bioinf/wiki/pmwiki.php?n=Augustus.UTRTraining
My input file looks as follows:
contig_7643 IMGAG CDS 163 441 . + 0 ID=contig_7643_1.1_cds_1;Parent=contig_7643_1.1
contig_7643 IMGAG CDS 525 617 . + 0 ID=contig_7643_1.1_cds_2;Parent=contig_7643_1.1
contig_7643 IMGAG CDS 807 914 . + 0 ID=contig_7643_1.1_cds_3;Parent=contig_7643_1.1
contig_7643 IMGAG CDS 1589 1703 . + 0 ID=contig_7643_1.1_cds_4;Parent=contig_7643_1.1
contig_7643 IMGAG CDS 1793 1926 . + 2 ID=contig_7643_1.1_cds_5;Parent=contig_7643_1.1
contig_7643 IMGAG CDS 2027 2128 . + 0 ID=contig_7643_1.1_cds_6;Parent=contig_7643_1.1
contig_7643 IMGAG CDS 2214 2306 . + 0 ID=contig_7643_1.1_cds_7;Parent=contig_7643_1.1
contig_7643 IMGAG CDS 2393 2528 . + 0 ID=contig_7643_1.1_cds_8;Parent=contig_7643_1.1
contig_7643 IMGAG CDS 2616 2728 . + 2 ID=contig_7643_1.1_cds_9;Parent=contig_7643_1.1
contig_7643 IMGAG 5'-UTR 67 162 . + 2 ID=contig_7643_1.1_cds_9;Parent=contig_7643_1.1
contig_7643 IMGAG 3'-UTR 2729 3172 . + 2 ID=contig_7643_1.1_cds_9;Parent=contig_7643_1.1
Could someone please help me with a one liner Perl / bash script that reports only those IDs that contain both 5'-UTR and 3'UTR in the input file? Note that what look like spaces between columns in the example input are actually tab separators
Thanks a ton!
In reply to Perl one liner help by onlyIDleft
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |