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 8278079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:53:07+00:00 2026-06-08T08:53:07+00:00

I am trying to write the code so that i eliminate the duplicate in

  • 0

I am trying to write the code so that i eliminate the duplicate in my result file, which is the line with “N/A” and line underneath it. Here is what i have:

    with open('false_'+uniprotID+'.txt','w') as fileinput:        
        for index, (start, end) in enumerate(searchPFAM(fname)):       
            for item in lookup[uniprotID]:
                for names in wholelookup[uniprotID]:
                    if re.search(r'\d+',names).group(0)==item and start <= int(item) <= end:
                        result = str(int(item) - start + 1)
                        try:
                            fileinput.write(">{0} | at position {1} | start= {2}, end= {3} | description: {4}\n".format(uniprotID, result, start, end, names))
                            fileinput.write(''.join(makeList[start-1:end]))
                            textwrap.wrap(''.join(makeList[start-1:end]),width = 60)
                            fileinput.write('\n')
                        except ErrorIO as e:
                           break 
                    else:
                        fileinput.write(">{0} | N/A | start= {1}, end= {2} | description: {3} \n".format(uniprotID, start, end, names))
                        fileinput.write(''.join(makeList[start-1:end]))
                        textwrap.wrap(''.join(makeList[start-1:end]),width = 60)
                        fileinput.write('\n')

My result file look like this:

Q14591 | at position 4 | start= 174, end= 196 | description: A177T

YQCRHCSKSFSQRSDLVKHQRIH

Q14591 | N/A | start= 174, end= 196 | description: M418T

YQCRHCSKSFSQRSDLVKHQRIH

Q14591 | at position 21 | start= 398, end= 420 | description: M418T
YACSDCTKSFSRRSDLVKHQRIH

Q14591 | N/A | start= 398, end= 420 | description: M418T

YACSDCTKSFSRRSDLVKHQRIH

  • 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-08T08:53:08+00:00Added an answer on June 8, 2026 at 8:53 am

    Why don’t you just filter them out afterwards?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write some code that that will draw the line which
I am trying to write some code that will open a file, read its
I've been trying to write code that loads a .png file, attaches hotspot information,
I have been trying to write some code that asks the user for several
I m trying write code that after reset set up rrpmax as 3000. It
I'm trying to write code that will load an image from a resource, and
I'm trying to write a code that adds a class to a div for
I am trying to write some code that will generate accurate .proto files from
I'm trying to write a code that could print something like this -xv -xvv
I am currently trying to write some code that will accept some FTP details,

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.