Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8549711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:46:52+00:00 2026-06-11T13:46:52+00:00

Given perl script cut the input sequence at E and skips those particular positions

  • 0

Given perl script cut the input sequence at “E” and skips those particular positions of “E” which is mentioned in @nobreak, and generates an array of fragments as an output. But I want a script which generates set of such array in output for every position which has been skipped taking all positions of @nobreak into account. say set 1 contains fragments resulted after skipping at “E” 37, set 2 after skipping at “E” 45, and so on. Below mentioned script which I wrote is not working correctly. I want to generate 4 different array in output taking one position of @nobreak at a time. Please help!

my $s = 'MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAEDLQVGQVELGGGPGAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN';

print "Results of 1-Missed Cleavage:\n\n";

my @nobreak = (37, 45, 57, 59);
{
    @nobreak = map { $_ - 1 } @nobreak;

    foreach (@nobreak) {

        substr($s, $_, 1) = "\0";
    } 
    my @a   = split /E(?!P)/, $s;
    $_      =~ s/\0/E/g foreach (@a);
    $result = join "E,", @a; 
    @final  = split /,/, $result;
    print "@final\n";
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:46:54+00:00Added an answer on June 11, 2026 at 1:46 pm

    Loop over @nobreak?

    my $s = 'MALWMRLLPLLALLALWGPDPAAAFVNQHLCGSHLVEALYLVCGERGFFYTPKTRREAEDLQVGQVELGGGPGAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN';
    print "Results of 1-Missed Cleavage:\n\n";
    my @nobreak = (37,45,57,59);
    for my $nobreak (@nobreak) {
        substr($s, $nobreak-1, 1) = "\0";
        my @a = split(/E(?!P)/, $s);
        substr($s, $nobreak-1, 1) = 'E';
        $_ =~ s/\0/E/g foreach (@a);
        $result = join ("E,", @a); 
        @final = split(/,/, $result);
        print "@final\n";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following perl script that works locally given the input parameters. I
I have a perl script URL which gives me a ZIP file, it processes
I have a Perl script which forks a number of sub-processes. I'd like to
Has anyone run perl script given at http://oreilly.com/pub/h/974#code ? This is a famous one,
I have a question about Perl from the script below. If the input for
I have a perl script which is used to process some data files from
Given that I have a local Perl script that prints Hello in a windows
I am trying to write a simple perl script to apply a given regex
I have this Perl script which is used to sort packages based on package
I have written a Perl script, I just want to give it to every

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.