Questions tagged [python]

python is a programming language, widely used in bioinformatics

Filter by
Sorted by
Tagged with
5
votes
3answers
1k views

How to translate amino acid sequences to Nucleotide sequences

I want to convert a list of fasta ( protein sequences) in a .text file into corresponding nucleotide sequences. A Google search gives me result of DNA to protein conversion but not vice versa. Also, I ...
9
votes
3answers
3k views

Running Snakemake in one single conda env

I have been experimenting a lot lately with Snakemake, I love it. Recently I also switched to using conda (--use-conda) in the way that is advertised. However, I have some issues with it, mostly ...
1
vote
1answer
67 views

Extract autodocked protein-ligand connections programatically

I have 2 crystal structures, one for my protein and one for my ligand (I have several protein-ligand pairs). I am using AutoDock Vina to simulate docking, which returns another file of the ligand with ...
1
vote
2answers
175 views

How to sort multiple FASTA files based on their content?

I have around 10,000 FASTA files of Influenza A virus. These files contains sequences of each of the 8 segments of the viral genome and I want to separate these files into different locations based on ...
9
votes
2answers
2k views

How do you generate read-length vs read-quality plot for long-read sequencing data (e.g., MinION)?

How do you generate read-length vs read-quality plot (heat map with histograms in the margin) for long-read sequencing data from the Oxford Nanopore Technologies (ONT) MinION? The MinKNOW software ...
11
votes
3answers
5k views

Converting a VCF into a FASTA given a reference with Python, R

I am interested in converting a VCF file into a FASTA file given a reference sequence with Python or R. Samtools/BCFtools (Heng Li) provides a Perl script ...
9
votes
1answer
332 views

How to get the count of each kmer past 255 using khmer

I have a Fastq file and I want to get the exact count of each possible kmer from this file. On a previous post called How to use khmer to count k-mers? Daniel Standage proposed a custom script based ...
8
votes
1answer
397 views

Getting protein FASTA sequence based on keyword with python

I would like to gather proteins FASTA sequence from Entrez with python 2.7. I am looking for any proteins that have the keywords: "terminase" and "large" in their name. So far I got this code: ...
7
votes
1answer
590 views

Filtering bases based on phred qualities with pysam

Is there a way to filter bases in BAM files based on phred quallities through python's pysam ? I have a code here that Takes the nucleobases per position from a BAM file using pysam's pileup ...
7
votes
2answers
2k views

Extracting the CIGAR string from a BAM via Python?

Is there a standard method in Python to extract a CIGAR string from the BAM? There are great libraries which parse the CIGAR, e.g. https://pypi.python.org/pypi/cigar/0.1 ...
4
votes
2answers
689 views

Finding a single open reading frame with ribosomal binding site, using Biopython

I'm given a Fasta file, containing a large DNA(over 115,000 long) sequence, and I am tasked with finding a single large open reading frame contained within the DNA sequence using Biopython. I'm ...
3
votes
1answer
428 views

python does not quit when the input file is too big

I have a script that extracts the set of unique kmer pairs from a kmer dump file (& then using them downstream to guess ploidy). The script seems to work correctly (it's reporting a meaningful ...
3
votes
1answer
691 views

Downloading SRA Files from AWS

I want to download the original BAM files that the authors had uploaded to SRA. Normally, I would just use sam-dump, but the files are having issues that seem ...
3
votes
1answer
2k views

Greedy Motif Search Using Probability Matrices

In my greedy search with pseudocounts algorithm in my bioinformatics course, I did not follow the pseudocode since I wanted to solve the problem in my own way. Unfortunately, although my answer is ...
3
votes
2answers
218 views

Pepsin digest (cleavage) does not work using RE?

Aim is to code the theoretical peptic cleavage of protein sequences in Python. The cleavage (cutting) rule for pepsin is: 1234^567. This is a position, ...
1
vote
2answers
104 views

Interpreting GWAS results with different settings

I did a bunch of GWAS analysis (linear model without covariates) with applying different quality controls. How to choose the optimal settings when filtering for minor allele frequency (maf), Hardy-...
1
vote
0answers
61 views

Trying to download a large number of files from ENA programmatically

I am downloading a large number of files from the ENA in Python using Multithreading. As an example, to be more concrete, I tried downloading 12 files simultaneously using 12 threads. I noticed that ...
0
votes
1answer
264 views

Remove Redundant Sequences from FASTA file in Python

I'm attempting to remove redundant sequences from a fasta file (from NCBI). When I execute this code, it returns the number of spots, not the number of sequences. (Number of spots: 408,293, Number of ...
0
votes
2answers
44 views

How to obtain desired output?

I am working on a project using the following command within nano: ...
0
votes
0answers
53 views

GWAS phenotype data format and preprocessing

I have a set of different phenotypes which I want to use for a GWAS analysis (general linear model). I have a couple of questions and uncertainty about the phenotype data input. I have control and ...