Questions tagged [pset6-dna]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
17 views

check50 gives different output than my own for “18.txt” sequence. All others pass. Any thoughts/suggestions are appreciated

from sys import argv import csv import re # Only run if argc is 3 if len(argv) == 3: STRs = ["AGATC", "TTTTTTCT", "TCTAG", "GATA", "TATC", "...
0
votes
0answers
17 views

CS50 PSET 6 DNA Just Returns First Name

I've been working on DNA for a while now and thought I was done, but there's a problem with my code. Everytime I run it, the program just prints the first name on the database, so either 'Albus' or '...
0
votes
1answer
41 views

PSET 6 DNA - Computing STRs

I am trying to compute the most repeated STR for each sequence in a dictionary called str_dict. # compute STRs i = 0 # stablish length of the sequence length_seq = len(sequence) # iterate through all ...
0
votes
3answers
47 views

Program for dna not printing anything

I have written a program for DNA, but it's not printing anything. Code: import csv from sys import * if len(argv) != 2: print("Usage: python dna.py data.csv sequence.txt") def maxcount(...
0
votes
1answer
54 views

Computing consecutive STR is sometimes off by a little (Spoiler!)

My code works fine for the small csv file; however, when I get to the big csv file, my counts for the number of consecutive STR are less than the actual value by about 1 or 2. Here is my code: import ...
0
votes
1answer
99 views

pset6 count STR in the DNA sequence issues

so i m a bit confused...i have been testing my code using the small database and what i have so far produced what i expected .... more specifically the STRcounts (i marked that part #?????). it is ...
0
votes
0answers
66 views

PSet 6 DNA: Not able to match variables to dictreader names

I've mostly completed my code for PSet 6, except for the last part where I need to match up the values against the list of names. I know how to get the maximum occurances of the STRs and state the ...
0
votes
0answers
28 views

DNA.py error: 'TypeError: unsupported operand type(s) for *: 'NoneType' and 'int''. It passes all but 2 of the tests

DNA.py is nearly finished, but it is failing the tests with sequence/15.txt and 16.txt. This is the error message: ~/pset6/dna/ $ python dna.py databases/large.csv sequences/16.txt Traceback (most ...
0
votes
0answers
13 views

Pset - 6 DNA (Not getting accurate results for some test cases)

This is my code for pset6 -> dna, it gives successful output for some test cases while fails for others. Please help! from sys import argv, exit import csv if len(argv) != 3: print("Usage:...