in reply to Re: How do i extract only contigs of interest
in thread How do i extract only contigs of interest
THANKS!#!/usr/bin/perl use warnings; use strict; my %contig; open (my $CNTG, '<', $ARGV[0]) or die $!; while (<$CNTG>) { chomp; # s///; # Remove the underscore, as it doesn't appear in the genba +nk. $contig{$_} = 1; # print $_; } local $/ = '//'; # Read the file one record a time. open (my $GB, '<', $ARGV[1]) or die $!; while (<$GB>) { if (my ($id) = /LOCUS \s+ \S+ _ (contig [0-9]+)/x) { print if $contig{$id}; } } ~
|
|---|