Rosalind is a platform for learning bioinformatics through problem solving.
Questions tagged [rosalind]
56 questions
0
votes
1 answer
With Python, I want to add the last two values of a string but I want to keep double digit numbers together and not include spaces in the string index
I need to create a fibonacci sequence (k = 5, until 5 elements are in the sequence) from an original string containing two starting values. While calling the last two elements in the string forward (newnumber= old[-1] + old[-2]) I pull the number…
0
votes
1 answer
Rosalind - Consensus and Profile - Issue with answer formatting
I am working on the Consensus and Profile problem on Rosalind, and I am so close to getting it done. My answer is correct, I have the right consensus string and the correct matrix, but I am having issues formatting my data for the answer. Rosalind…

danielpintard
- 3
- 1
0
votes
1 answer
Rosalind Translating RNA into Protein problem
Hello i tried doing this problem from ROSALIND but when i put the example rna sequence (AUGGCCAUGGCGCCCAGAACUGAGAUCAAUAGUACCCGUAUUAACGGGUGA) it produced me the wrong output "['M', 'M', 'N', 'I']" instead of the suggested "MAMAPRTEINSTRING".I tried…
0
votes
1 answer
Cumulative Binomial Probability Python
I tried to calculate the Cumulative Binomial Probability to resolve the "Independent Alleles" problem from Rosalind, and I think I got the program right but the result gives me "wrong" every time.
The problem:
Given: Two positive integers k (k≤7)…

MarianaZ
- 11
- 3
0
votes
0 answers
I can't use properly the replace command in python
I'm new on the platform:
I have a doubt about the use of the replace command.
Here is my code and what I need to do:
The thing is that I need to replace a substring with a string sequence.
For example:
from: Hitacoworld to Hiworld.
The thing is that…

dananada
- 21
- 2
0
votes
1 answer
Rosalind Consensus and Profile Problem code doesn't work
This is the problem: http://rosalind.info/problems/cons/
def file_read(fname):
with open(fname, "r") as myfile:
global data
data = myfile.readlines()
print(data)
i = 0
while i < len(data):
…

sickleox2
- 35
- 6
0
votes
0 answers
How can I improve the speed of my R code regarding shortest substring implementation problem?
I decided to implement this problem from Rosalind in R. It works great for small sample dataset:
>Rosalind_56
ATTAGACCTG
>Rosalind_57
CCTGCCGGAA
>Rosalind_58
AGACCTGCCG
>Rosalind_59
GCCGGAATAC
however it takes long time when I run it for real…

Adamm
- 2,150
- 22
- 30
0
votes
0 answers
Want to find the positions where a pattern (substring) starts in another string in python
Input:
strA = "ATATATGCGATAT"
strB = "ATAT"
output:
0 2 9
I was looking for a way to find the starting positions in a string (strA), every time a pattern (strB) starts.

Sukanta
- 75
- 6
0
votes
1 answer
I couldn't understand the cause of that name error
I am trying to solve the problems at http://rosalind.info/problems/list-view/ and there is a problem called IPRB.In short, we have 3 different organisms k(homozygote dominant), m(heterozygote) and n(homozygote recessive). It asks you to calculate…

Mehmet İzmirli
- 11
- 2
0
votes
3 answers
How to write a string algorithm
given a FASTA text file (Rosalind_gc.txt), I am supposed to go through each DNA record and identify the percentage (%) of Guanine-Cytosine (GC) content.
Example of this is :
Sample…
0
votes
2 answers
Consensus string & profile matrix
I have written the following python code to solve one of the Rosalind problems (http://rosalind.info/problems/cons/) and for some reason, Rosalind says the answer is wrong but I did some spot-checking and it appears right.
The problem is as…

Radwa Sharaf
- 159
- 14
0
votes
1 answer
Mortal Fibonacci Rabbits -error at values greater than 6
I try to count Mortal Fibonacci Rabbits. The task assumes that rabbits die out after a fixed number of months.
The picture shows how the number of rabbits changes over time Rabbits
The Fibonacci sequence for Mortal Rabbits looks like…

agro
- 57
- 12
0
votes
1 answer
Rosalind's - 'Ordering Strings of Varying Length Lexicographically' Is it possible to sort my result?
I tried to solve another of Rosalind(http://rosalind.info/problems/lexv/) problems by myself, however unfortunately I have to ask you for help.
Here is my approach:
First of all; function which creates all possible substrings of input string with…

Adamm
- 2,150
- 22
- 30
0
votes
1 answer
Rosalind Consensus and Profile
I am trying to solve the question from here http://rosalind.info/problems/cons/
My script fills the counter lists and outputs a consensus string of equal length. I don't think there are math or index errors going on and have run into a wall. My…

Sank Finatra
- 334
- 2
- 10
0
votes
1 answer
Rosalind Profile and Consensus: Writing long strings to one line in Python (Formatting)
I'm trying to tackle a problem on Rosalind where, given a FASTA file of at most 10 sequences at 1kb, I need to give the consensus sequence and profile (how many of each base do all the sequences have in common at each nucleotide). In the context of…

Callen Bragdon
- 15
- 4