This is a test version of Biostars. For the public version, visit https://www.biostars.org.
TraDIS Simulation Experiment

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

0 answers

No answers yet.

Log in to answer this question.