TraDIS Simulation Experiment
0
0
Entering edit mode
7.9 years ago

I have this script below, but wish to define some essential genes and exclude any insertions within those genes from the output. Can anyone direct me on how to get this done. A more illustrative suggestion will be more appreciated as I am new to writing script with perl.

!/usr/bin/perl

use warnings; use Bio::SeqIO;

my $in=Bio::SeqIO->new(-file=>"k12.gbk", -format=>"genbank"); while (my $seq=$in->next_seq){ #Do things with each sequence here

my@random_set; my%seen;

for (1 .. 100){ my $number = int rand(100); redo if$ seen {$number} ++; push @random_set, $number; }

Random number generation code.

for my $position (@random_set) { print ">$position\n", $seq->subseq($position+1, $position+100), "\n";

my $subseq = $seq->subseq($position-1, $position-100);

$subseq is a string

my $rcseq = reverse $subseq; $rcseq =~tr/ACGT/TGCA/;

print " $rcseq, \n"; } }

sequencing • 1.1k views
ADD COMMENT

Login before adding your answer.

Traffic: 1960 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6