Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python]

python is a programming language, widely used in bioinformatics

0
votes
1answer
49 views

How to get PSSM of protein by protein sequence with python?

I didn't find way that convert protein sequences in FASTA to PSSM by python, and how to write program in python to find PSSM for our data set ? Maybe better to question how to find PSSM from NCBI ...
4
votes
2answers
39 views

Group genes by functional categories suming expression values

Using the count of rpkm values from genes in a metagenome sample, I want to group these genes into established categories (for example KEGG or COG). For each sample, my goal is to determine which ...
0
votes
0answers
22 views

Python module bamtags

Does anyone know this python module, bamtags? I'm using a pipeline (Dovetail Genomics, HiRise) that imports it, but it seems it doesn't exist. It's impossible to install it and there is no ...
2
votes
1answer
42 views

RSVSim insertions from chr1 to chr2

edit explaining python tag I would still rather have a solution based on the RSVSim package in R, but while waiting for someone who might have an answer I wanted to look at other solutions as well. ...
2
votes
0answers
79 views

Searching for start and stop codons for protein sequencing of contigs

I need to convert contigs into their respective protein sequences given a reference genome (i.e. I need to take a substring, whose position is already known on the string, and I need to locate the ...
1
vote
1answer
41 views

Store contigs and genome substrings based on mismatches

I have a string, a list of substrings, and a list of positions where substrings are found in string. ...
2
votes
0answers
52 views

How to plot character state changes from a presence-absence matrix on to a phylogeny

I am trying to assign character state changes from a presence-absence matrix to a phylogeny. I have tried assigning each character to its leaf node, and then if the leaf node's sister has the same ...
1
vote
1answer
38 views

AttributeError: module 'scater' has no attribute 'normalize'

I am using rpy2 to run normalization using scran package. After calling computeSumFactors I ...
3
votes
1answer
46 views

python package for NNI neighbors

I am working on protein sequence data files for reconstructing phylogenetic tree and I need to generate all NNI-neighbours of the tree (two trees are NNI-neighbours if one can be transformed into ...
3
votes
1answer
89 views

How to iterate protein sequences using amino acids?

I was working on certain program using python and I have been using a protein aligned sequence file in two formats, phylip (.phy) and clustal (.aln). Example clustal file: ...
2
votes
1answer
62 views

Counting the characters in a row using python

I am using python 3 and biopython 1.72. I have been using a protein sequence file in clustal format. ...
3
votes
1answer
77 views

How to automate NCBI genome download

I need to download all the completely assembled cyanobacterial genome's GenBank file(.gbff) from NCBI(RefSeq or INSDC ftp data). For this I think, the steps are: Need to find the completely ...
0
votes
1answer
52 views

Check if a string is ensembl gene id or not in python

I have many scRNAseq datasets saved as hdf5 files, and when I open them keys sometimes are confused, so I need a way of ...
-1
votes
1answer
37 views

Convert TPM-normalized matrices back to UMI in python

I want to process a plenty of scRNAseq datasets in python, and I want to run TMM ...
5
votes
2answers
77 views

Counting letters in phylip alignment columns with Biopython

I have been using python 3.6 and biopython 1.72 to work with protein data files. I am using a protein sequence file (phylip format), for example: ...
0
votes
0answers
32 views

Buried Protein Atoms vs. Solvent-Accessible Protein Atoms

I am trying to come up with an algorithm that would differentiate solvent-exposed surface atoms from cavities which can fit water inside. Unfortunately, it seems the Shrake-Rupley algorithm does not ...
4
votes
1answer
79 views

Using pysam with cython: htslib/kstring.h not found

I'm trying to learn to use cython to speed up some code based on pysam. My issue is not strictly speaking about bioinformatics, but rather about building tools using a bioinformatics library. I hope ...
-2
votes
1answer
59 views

Python API for working with ENSEMBL genomes

Dear bioinformaticians, I could find two python APIs to mine ENSEMBL genome databases. There is a pyensembl which is more popular and then there is ...
1
vote
1answer
35 views

How to efficiently extract coordinates from a `pybedtools.Interval`?

I'm using pybedtools to process data, and at some point, I loop over a BedTool object and use unpacking to extract coordinates from the ...
0
votes
1answer
33 views

How to calculate Moreau-Broto autocorrelation, Moran autocorrelation, Geary autocorrelation from protein (amino acid) sequences?

I want to code Moreau-Broto autocorrelation, Moran autocorrelation, Geary autocorrelation in Python 3.6 from the scratch for amino acid sequences without using any package. Unfortunately, I have not ...
2
votes
1answer
69 views

Plotting Ramachandran Plot from more than one PDB file

I want to plot a Ramachandran Plot for around 5000 PDB files in python that is saved in a folder in my system. I am searching for a way to make it without accessing each file by hard-coding each file ...
2
votes
1answer
99 views

pysam pileup: what reads appear in the pileup?

Cross-posted on Biostars (with no answers currently). I hope that's OK. I thought that iff a read matches the reference at a position, it would appear in the pileup column for that position. But ...
2
votes
1answer
62 views

Download proteomes from NCBI based only on binomial names

I'm trying to download around 2000 proteomes from NCBI, but all I have is the genus and species e.g: lophodermium_seditiosum trichoderma_harzianum Does anyone know ...
0
votes
2answers
97 views

Running python script from terminal: umap issue

Some time ago I asked the question: RunUMAP in Seurat not working: module 'umap' has no attribute 'UMAP' It was solved by following the answer in it, however, it is still not ...
3
votes
1answer
46 views

Issues installing Dendropy

I want to perform phylogenetic analysis using Dendropy. I have installed dendropy using command sudo pip install -U dendropy but when I import it in python3.5.1 it ...
6
votes
1answer
65 views

Generating random BED intervals given constraints

Problem is to generate a random BED interval given the following constraints: minimum start maximum end fixed length maximum ...
3
votes
1answer
81 views

How to extract the protein fasta file from a genbank file?

Let's say I have a genbank file, e.g. the one downloaded from here, that contains entries as ...
13
votes
1answer
161 views

Biopython Phylogenetic Tree replace branch tip labels by sequence logos

Having recently constructed a lot of phylogenetic trees with the module TreeConstruction from Phylo package from Biopython, I've been asked to replace the branch tip labels by the corresponding ...
4
votes
1answer
89 views

Finding proteins in a sequence

I have a file with protein sequences, all on a single line, like this: ...
5
votes
2answers
116 views

Is there a Python/R package with the ability to convert an alignment and reference into a CIGAR?

I'm writing a python function from scratch to do this, but I feel like this must exist in some standard bioinformatics library already. In principle, this is a simply regex operation which many must ...
1
vote
2answers
50 views

counting individuals with the present gene and absent gene for each population

I have a folder containing 500 files from different individuals: ...
6
votes
1answer
87 views

How to convert the given mathematical computation (on biological problem) to mathematical fomula, equation?

I have crossposted this question in maths StackExchange. The problem is dominantly mathematical (this question) but the application of the problem is mainly biological. Hoping that people in this ...
1
vote
1answer
146 views

I need to use my code with fasta format. Can anybody help?

I need some help. I have written a program that simulates protein cleavage but I need to modify it so that it produces fasta formatted output. here is all of my sequence in .fas file ...
6
votes
1answer
177 views

Convert R RNA-seq data object to a Python object

I have done some work in R and would like to try a Python tool. What is a good way to import the data (and its annotations etc) as a Python object? I am particularly interested in converting a ...
3
votes
2answers
63 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, ...
5
votes
1answer
92 views

Evaluate clusters of individuals by using their sequence data

For a dataset of several hundred individuals, I applied a hierarchical clustering to generate clusters based on a functional trait that sets them apart. My task is now to evaluate if these clusters ...
5
votes
1answer
368 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 ...
7
votes
1answer
125 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 ...
3
votes
2answers
154 views

Generating the reconstructed alignment from BAM

I have a (small) BAM file with CIGAR and MD fields. Question 1: What tools exists in Python and/or R to reconstruct the alignment between the reference and the read in a BAM? Given that this is a ...
1
vote
0answers
39 views

Post ipyrad filtering of SNP loci from GBS, based on SNP quality

I want to use SNPs produced by ipyrad analysis of GBS data in RAxML to examine the monophyly of a highly-variable focal species and its phylogenetic relationships with about 40 congeners. An initial ...
12
votes
7answers
2k views

What is the fastest way to get the reverse complement of a DNA sequence in python?

I am writing a python script that requires a reverse complement function to be called on DNA strings of length 1 through around length 30. Line profiling programs indicate that my functions spend a ...
0
votes
0answers
34 views

I can't run HotNet2

I have probably a basic problem, while I have worked with python (a little bit) before I cannot make HotNet2 to run properly. I have a list of de novo mutations in txt named ...
3
votes
3answers
61 views

assigning different characters to present and absent genes from blast output using perl or python

I have file called pangenome.txt which has only one column containing the names of the genes ...
4
votes
0answers
94 views

How to find which scales are available in SeqUtil of Biopython?

I am trying to analyse the hydrophobicity of a sequence using biopython. ...
5
votes
2answers
158 views

How to write a hash function for canonical kmers?

This question is a follow up from How do kmer counters determine which kmer is 'canonical'?. In that question we learned that kmer counting programs use a 2-bit hash function to internally represent ...
4
votes
0answers
192 views

Is there a standard way to clean a PDB file and re-number its residues?

Is there a pre-existing tool that I am not aware of which will tidy up the numbering of a PDB file? I would like to re-number the residues on inserts to make the icode an actual residue in the chain ...
0
votes
0answers
84 views

How can I calculate and compare intra-cluster correlation for each GO term and pathway?

How can I calculate and compare intra-cluster correlation for each GO term and pathway? I want for all the genes, which belong to the same GO-term, calculate a similarity score. Each GO term can be ...
1
vote
1answer
147 views

Comparing two multi-fasta files of the same set of proteins with parser - to find and count mutations after treatment

My task is to count the mutations occurred in several proteins after a treatment. The sequences are all present in the two files in the same order. I opened both files with the FASTA parser (...
0
votes
1answer
50 views

QMean standalone evaluation

I want to use a script to evaluate a protein structure with QMEAN scoring. I can't understand why the script suggested by SWISS-MODEL (access to QMEAN by json object) runs only if I put the commands ...
4
votes
1answer
34 views

Make ipyrad use cuda-enabled NVidia card on Ubuntu

I want to use ipyrad on a new Ubuntu machine that has an NVidia Quadro K2000 card with 384 cores. One can configure ipyrad to run on a linux cluster. Do I have any options to get ipyrad to access ...