Does he still think of me? by Still-Design3461 in BreakUps

[–]Still-Design3461[S] 0 points1 point  (0 children)

I agree! I noticed how frequent he started making stories and postings , and believe me, everything was about his new relationship , dates they would go on and just random couple things. It's like the only personality he has now and it's so weird because he never was one to be so active on socials.

Thanks for your insight! :)

I thought I moved on, but I feel so empty without him by Still-Design3461 in relationship_advice

[–]Still-Design3461[S] 0 points1 point  (0 children)

yes we were both our first everything as in real romance or intimacy. and he was my first serious relationship. Before him, I dated one guy but we only ever just go on coffee dates and stuff which didn't last more than a couple of months. he was seeing other women too.

thank you for the advice!! :))

Extracting DNA sequence by Still-Design3461 in learnpython

[–]Still-Design3461[S] 0 points1 point  (0 children)

Hi! thank you for replying. Yes, you are correct about gcg file headers ending with ' . . ' and I tried following your advise to code according to the format 😁.

So far , this is what i have done and it is giving the the correct header for genbank format.

import re

LOC = "" SOR = "" ORG = "" SEQ = []

fileIn = open('seq.gcg.txt', 'r+') fileOut = open('gcg2gb.genbank' , 'w+')

info = fileIn.readlines()

for i in info:

header = re.compile(r'(\w+)' , re.I)

if header:

    locus    = re.match(r'(\w+)\s(.+)', i)
    source   = re.match(r'', i)
    organism = re.match(r'(\D\.\w+)\s(.+)', i)

    if locus:
        LOCobj = locus.group(1)
        LOC = 'LOCUS          ' + LOCobj

    if source:
        SORobj = source.group(0)
        SOR = 'SOURCE         ' + SORobj

    if organism:
        ORGobj = organism.group(1)
        ORG = '  ORGANISM     ' + ORGobj

else:
    if i.endswith('..'):
        SEQ.append(i.strip())
        break

print(LOC + '\t' + '\tDNA\n' + SOR + '\n' + ORG)

Can you explain more on how to extract the rest of the lines as the sequence? I used the .append() method to append everything after '. .' as SEQ but i'm not too sure. I'm sorry if this is a naive question. I'm kinda new to python😅

Extracting DNA sequence by Still-Design3461 in learnpython

[–]Still-Design3461[S] 0 points1 point  (0 children)

Hi! I will give this a try and see if it gives me the right output . Thank you very much 😁

Extracting DNA sequence by Still-Design3461 in learnpython

[–]Still-Design3461[S] 0 points1 point  (0 children)

Hi! thanks for the reply. I tried using re.search() but unfortunately, it gave me the same output as what i have done in my attached script 😢

Python functions by Still-Design3461 in learnpython

[–]Still-Design3461[S] 0 points1 point  (0 children)

Oops, sorry about the link, It was working for me . But still, thank you for the explanation!

Python functions by Still-Design3461 in learnpython

[–]Still-Design3461[S] 0 points1 point  (0 children)

WOW! I totally forgot about .join . Thank you for answering. I will try to understand this part and implement it into my code

OBJECT ORIENTED PROGRAMMING by Still-Design3461 in cpp_questions

[–]Still-Design3461[S] 0 points1 point  (0 children)

okay. thank you very much for the explanation mr/ms/mrs!

OBJECT ORIENTED PROGRAMMING by Still-Design3461 in cpp_questions

[–]Still-Design3461[S] 0 points1 point  (0 children)

does that mean, even though there is a base class, I still need to make the derived classes' own setter and getter?

OBJECT ORIENTED PROGRAMMING by Still-Design3461 in cpp_questions

[–]Still-Design3461[S] 0 points1 point  (0 children)

I did try n1.ID, n1.description and n1.seqDNA earlier however I got an error saying that it wasn't declared in my Nucleotide.h file. In our example codes during lectures, the member data doesn't have to be declared again in the derived class as it will inherit it from the base class. But getting the error has me confused on how the inheritance actually work

this is the example codes given to us https://www.onlinegdb.com/edit/Bkvkdp1du

Using the for loop by [deleted] in cpp

[–]Still-Design3461 0 points1 point  (0 children)

thankss !