Bioinformatics is the use of software tools to analyse biological data.
2
votes
2answers
56 views
Reading genetic data in VCF and Tabix formats using an asynchronous library
I'm working with an open-source library for processing and parsing genetic data in VCF and Tabix formats. It contains functions and classes that make it easy to read an index file (a Tabix) and load ...
6
votes
1answer
67 views
Calculating protein mass
This question is part of a series solving the Rosalind challenges. For the previous question in this series, see A sequence of mistakes. The repository with all my up-to-date solutions so far can be ...
4
votes
3answers
80 views
Nucleotide count in Scala
This is my second day in learning Scala and I still need to develop a taste of functional programming, I often find myself doing imperative coding. Below is the result of my TDD practice.
Code
...
5
votes
3answers
43 views
Counting GUAG introns in chromosomes
I have this code that is working fine but it's taking pretty much 100% of my cpu to run and it takes around 25min. I'd really like to optimize it but don't know what parts I could improve.
The main ...
2
votes
2answers
45 views
A sequence of mistakes
This question is part of a series solving the Rosalind challenges. For the previous question in this series, see The Genetic Code. The repository with all my up-to-date solutions so far can be found ...
6
votes
3answers
467 views
The Genetic Code
This question is part of a series solving the Rosalind challenges. For the previous question in this series, see Wascally wabbits. The repository with all my up-to-date solutions so far can be found ...
2
votes
0answers
61 views
Needleman Wunsch algorithm in Scala
The Needleman–Wunsch algorithm is an algorithm used in bioinformatics to align protein or nucleotide sequences.
Here is an implementation in Scala:
...
2
votes
0answers
24 views
Adding information to a compressed file and compressing the output
I wrote this script for adding information to a compressed file and compressing the output:
...
1
vote
1answer
34 views
Compare sequence & maps headers in fasta file
This is the perl code which compares the sequence in fasta file & maps the header. Though the code is working well, I still would like to make it more efficient. Since the files I compare has >...
3
votes
0answers
55 views
Determining if a genetic sequence is palindromic
Adding another level to my previous question on 'normal' palindrome identification, in this one I'm interested in identifying genetic palindromes. Here's my attempt:
...
1
vote
1answer
47 views
Collating creature descriptors spread across multiple stanzas
I have been using Python for only a few days, so I am trying to learn about some best practices. An explanation of what this code is supposed to do is at the bottom of this post. It is an exercise to ...
5
votes
1answer
71 views
VCF parser for eventual genomic data visualization
I've just started out writing an app that will visualize genomic data for anybody to understand.
When you get your genome sequenced the raw data usually comes in the form of a VCF file. I started out ...
4
votes
1answer
77 views
Rosalind problem “Consensus and Profile”
Source: Rosalind("Consensus and Profile")
Brief summary
...
6
votes
3answers
71 views
Categorizing gene sequences read from a CSV file
I am relatively new to programming and would love to get some feedback on the following section of my code.
...
3
votes
1answer
57 views
V Snare T Snare Model
In the beginning, everything is defined to be of value 10, but I have to change them to suit them for different possible values, hence those are changing. I'm a (Im)mature C coder, hence there might ...
2
votes
1answer
37 views
Compare a sequence with the reference frequency of hexamers
I have written this function (and others similar to that one) But I am not sure I am using references on their full power.
My currently concerns is if I make a huge use of memory. The subroutine ...
4
votes
2answers
169 views
DNA base pair match counter
So my code is done it outputs exactly what it needs to I'm just wondering if it is possible to make this code a lot more simple using objects. If so could someone tell me what I would need member-wise ...
3
votes
2answers
68 views
Rosalind string algorithm problems
I've been starting to learn Rust by going through some of the Rosalind String Algorithm problems.
If anyone would like to point out possible improvements, or anything else, that would be great. There ...
7
votes
3answers
148 views
Prefix Sum in Ruby, Genomic Range Query from Codility
I'm currently going through some lessons on Codility. I've just spent a couple of hours with GenomicRangeQuery, which is intended to demonstrate the use of prefix sums.
The task description is here. ...
6
votes
1answer
307 views
High performance parsing for large, well-formatted text files
I am looking to optimize the performance of a big data parsing problem I have using Python. The example data I show are segments of whole genome DNA sequence alignments for six primate species.
Each ...
6
votes
3answers
92 views
4
votes
1answer
80 views
Find allele frequencies at each site for each iteration for each population from FASTA file
The script takes a FASTA format file in input and outputs the frequencies of each amino acid (A, C, ...
0
votes
2answers
597 views
Comparing two columns in two different rows
I want to go through each line of the a .csv file and compare to see if the first field of line 1 is the same as first field of next line and so on. If it finds a match then I would like to ignore ...
2
votes
2answers
71 views
RNA/DNA transcriber
I've been going through some of the exercises over on exercism and this is one of my solutions: a basic RNA/DNA transcriber. I was happy enough at first but now, looking at it again, the solution ...
4
votes
2answers
123 views
Fast comparison of molecular structures and deleting duplicates
I have a program that reads in two xyz-files (molecular structures) and compares them by an intramolecular distance measure (dRMSD, Fig. 22). A friend told me that my program structure is bad, and as ...
5
votes
2answers
64 views
Converting domain-specific regular-expressions to a list of all matching instances
There seem to be several questions floating around Stackexchange regarding how to take a python regular expression list the matching instances. This problem is a bit different because 1) I'm need to ...
7
votes
1answer
143 views
Statistics about gaps in DNA sequences
Noobie to Numba here, I'm trying to get faster code from existing function but the result is not faster. 10 times faster would be heaven, but I know nothing about optimization.
This is code about ...
3
votes
1answer
345 views
Python Longest Repeat
I am trying to find the longest repeated string in text with python, both quickly and space efficiently. I created an implementation of a suffix tree in order to make the processing fast, but the ...
4
votes
2answers
182 views
bash script for constructing RNA pipeline
I have written a bash script that consists of multiple commands and Python scripts. The goal is to make a pipeline for detecting long non coding RNA from a certain input. Ultimately I would like to ...
5
votes
1answer
241 views
Reading an Excel file and comparing the amino acid sequence of each data pair
Since I am fairly new to Python I was wondering whether anyone can help me by making the code more efficient. I know the output stinks; I will be using Pandas to make this a little nicer.
...
1
vote
2answers
96 views
Counting adenine and cytosine bases
I've started a little challenge on a website, and the first one was about counting different DNA letters. I've done it, but I found my method very brutal. I have a little experience, and I know that ...
4
votes
2answers
307 views
Reflecting emotion classification based on the Lövheim cube
Background
I created a simple class to reflect emotion classification based on the Lövheim cube. The code is not scientific at all, and I just did it for fun, but I want all code I write to be as ...
2
votes
1answer
43 views
A Java class for reading MaCH dosage files v2.0
Version 2 of A Java class for reading MaCH dosage files
...
3
votes
1answer
75 views
A Java class for reading MaCH dosage files
A dosage file (used in computational genetics) is formatted like this:
...
4
votes
2answers
132 views
Convert impute2 files to mach format
Here is a program for converting Impute2 files into MaCH format (related to genetics).
Source files include one xxx_haps file and one xxx_samples file, for example:
...
3
votes
0answers
76 views
Finding the Cox regression coefficients in a mixed model for microarray data
I have written a code for a project which aims at finding the Cox regression coefficients in a mixed model for microarray data. The study was carried out on the Affymetrix Hgu133a platform. In the ...
2
votes
1answer
226 views
Slow Python text-processing script
This script of mine merges columns 1 and 2 from one input file and sees if these merged combinations exist in the other infile (and vice versa).
I know I get stuck in appending. It did not get past ...
4
votes
0answers
98 views
Vectorize Fisher's Exact Test
I have two data frames/ lists of data, humanSplit and ratSplit, and they are of the form
...
0
votes
1answer
225 views
Faster way to parse file to array, compare to array in second file, write final file
I currently have an MGF file containing MS2 spectral data (QE_2706_229_sequest_high_conf.mgf). The file template is here, as well as a snippet of example:
...
8
votes
1answer
1k views
Genetic Algorithm in Python
I'm a new programmer, so any help is welcome. Preferably to make it faster, avoid heavy memory usage, and so on.
...
6
votes
2answers
209 views
Comparing 2 lists of peptide to spectrum rankings generated by 2 different algorithms
I'm seeking a general review, but I'm particularly interested in style.
This program gets 2 lists of peptide to spectrum matches, so every spectrum title is linked to a list of 1 or 10 possible ...
10
votes
3answers
963 views
Counting DNA nucleotides in C
I have written code to solve the following Rosalind problem. This is my first time writing in C and I would like a review of my code, particularly in regard to correctness and performance.
...
3
votes
1answer
307 views
Calculating overlap of segments in chromosome data
I wrote an R code that basically performs 2 operations:
For each segment in file A, find all segments in file B that lie in that segment.
Find the percentage of overlap for each case in previous ...
1
vote
2answers
414 views
Parsing BLAST output in XML format using Regular Expression
There many other better ways to parse BLAST output in .xml format, but I was curious to try using regex, even if it is not so straightforward and common. Here is the code how to extract translated ...
3
votes
2answers
378 views
Rosalind's 3rd problem in Scheme
I have an imperative programming background and I've decided to study functional programming by applying it to problems found on sites such as Project Euler and Rosalind. My language of choice is ...
4
votes
2answers
134 views
Data screening using Perl
Background information
I've been asked to write a little Perl script that allows genomic data to be screened against reference files in order to determine locations of specific mutations.
The input ...
6
votes
2answers
95 views
Foreach-loop for and print commands
How can I make the following code shorter or efficient (maybe with other loops or other nice ideas), and keep the current functionality?
...
5
votes
2answers
703 views
Genomic Range Query
Recently I worked on one of the Codility Training - Genomic Range Query (please refer to one of the evaluation report for the detail of this training).
The proper approach for this question is using ...
10
votes
2answers
3k views
Calculating the joint probability of n events from a sample sequence of occurrences
I'm writing an algorithm to take in a sample list of sequences of events, calculate 1-step transitional probabilities from the sequences, forward or in reverse, then calculate the joint probability of ...
5
votes
1answer
106 views
Case study with a biological populations: a list of lists of lists
I have a population (Pop) which has an attribute which is a list of individuals (Ind) where each individual has an attribute ...