Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [python]

python is a programming language, widely used in bioinformatics

Filter by
Sorted by
Tagged with
5
votes
1answer
202 views

Why doesn't Biopython AlignIO.read() recognise the 'mauve' format?

On this Biopython tutorial, they describe how to import a multiple sequence alignment in the Mauve (XMFA: extensible multi fasta format). So I imported the AlignIO module: ...
2
votes
1answer
61 views

how to count the number of each allele of CNVs?

I have a bunch of files (vcf format) each containing site and sample annotations of a copy number variant (following example is part of one of my files, I am showing 11 individuals but they are nearly ...
4
votes
1answer
88 views

replacing SNPs with missing calls with a specific string

I have a big file containing 27 columns and nearly 6 million rows. The following is a little example of my file ...
4
votes
3answers
473 views

How to compare transcriptomic profiles of two cell types (single cell RNA-seq)?

I found this interesting Single RNA-seq data set in GEO, but I am not sure how to analyze it appropriately. They have deposited transcriptomic profiles of human and mouse pancreatic islets (...
4
votes
1answer
971 views

Using Python, how to convert a pandas DataFrame into a VCF?

Let's say I have a pandas dataframe with fields CHROM, POS, ALT, ...
4
votes
2answers
365 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 ...
0
votes
0answers
86 views

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

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 ...
7
votes
2answers
287 views

How to get all PDB homologs from Uniprot (mapping + BLAST)?

I'd like to create a dataset consisting of all sequences which are either present in the PDB, or whose homolog is present in the PDB. In other words, any sequence in the PDB or any sequence related to ...
3
votes
1answer
265 views

How can I apply proportional (p) distances (Nucleotide) using bioPython

I am working on phylogenetic tree generation. I used BioPython and ClustalW 2.x.x for this purpose. I have generate the tree using BioPython but when I try to generate tree using "MegaSoftware GUI" ...
10
votes
3answers
3k 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
5answers
2k views

How do I find identical sequences in a FASTA file?

I want to create a database for a proteomics study. Therefore, the mapping from a given sequence to a protein ID has to be unique. I am wondering whether there is already a built-in function in ...
1
vote
1answer
217 views

Filtering out all seqs with mutations of list2 from list1

I have 2 lists, list1 and list2, of protein sequences of the same given gene in different strains. In ...
1
vote
4answers
314 views

Convert population allele count into population allele frequency by using Perl or Python (translate available Bash into Perl or Python)

I already know the Bash AWK solution and also R code for the question that I am asking. But, my file is so big and with R it takes very long time and I am afraid of AWK's mistake for this computation, ...
1
vote
1answer
34 views

Using pythoncyc to get ec-code of a reaction

I am trying to collect the ec-code (and gene) of a reaction. I have tried the following: ...
2
votes
0answers
371 views

How to prevent sklearn Imputer(missing_values=“NaN”, strategy=“mean”, axis=0).fit_transform(data) from removing columns with only NA in them [closed]

I am trying to test a preexisting python machine learning script with a subset of my genetic data. One of the feature columns I am using happens to only have NA values in it. I lose this column when ...
4
votes
1answer
112 views

Adding entries to bigwig file

I generate bigwig files using a shell script based on bedtools genomecov (to generate a bedgraph from a bam file) bedmap (to ...
4
votes
2answers
756 views

How to map PDB chains to Uniprot IDs using API services

I have a lot of PDB IDs and I need to get uniprot fasta sequences of these PDB IDs special chains by API services. For example, imagine that I need to get fasta sequence of '1kf6' 'A' chain. The ...
3
votes
2answers
441 views

How do I export my biom object to a file in biom format?

I'm using the python API for the biom-format package. I read in two files in biom format and merged them, like so: ...
2
votes
1answer
501 views

Counting number of possible alignments between two DNA sequences using python

I was looking BioPython to calculate the number of possible alignments between two sequences. Let's say there are two input sequences with the length of m and n. The program will count the possible ...
3
votes
1answer
654 views

Find Patterns in Cluster

I have a heatmap and I would like to find some rectangles. I have already used clustermap. But here, I can not calculate these rectangles. The order of the data should not be changed. This Code is ...
4
votes
1answer
911 views

How to obtain clusters of hierarchical heatmap when using Python?

Is there a good way of obtaining the labels (e.g. genes) within individual clusters that haven been clustered hierarchically in Python (preferentially, but not necessarily, by seaborn)? I found these ...
3
votes
2answers
175 views

help with CRCmapper

I'm using CRCmapper on my data. There are several modules in the tool. I've used exactly instructed in the usage. Commands used: ...
4
votes
3answers
1k views

How can I extract gene names for a metabolic pathway from KEGG?

Note: this question has also been asked on Biostars I need the get the list of gene names involved in glycolysis (to put an example). Not manually, I need to do this in a script. Ideally with Python. ...
3
votes
2answers
215 views

pvalue calculation of protein-protein network with permutation test

Note: this question has also been asked on Biostars I have performed a network recreation analysis based on the interactions of proteins from String db. I wanted to know if the interactions have ...
5
votes
2answers
929 views

Way to get genomic sequences at given coordinates without downloading fasta files of whole chromosomes/genomes first?

So I have a list of start and stop positions along chromosomes in different species, and I'd like to get the corresponding DNA sequence for each set of coordinates. In the past, I've just download the ...
4
votes
2answers
325 views

Is it possible to do alignment within Python? Check variants against reference?

I'm currently adding a few SNPs randomly into a FASTA within python using BioPython. In the following example from BioPython, I add an SNV at location "5" http://biopython.org/DIST/docs/api/Bio.Seq....
2
votes
0answers
206 views

How to measure euclidean distance between points with vtkDelaunay3D package?

I'm working with python vtkDelaunay3D package for a special purpose. I've set some points but I do not know how can I measure euclidean distance between points with this package. Is there anyone who ...
1
vote
2answers
222 views

How to interconvert InChI and InChIKey?

I would like to retrieve IDs from several databases using InChI as an input, e.g. ...
5
votes
1answer
567 views

Read and write FASTA files with more information than id and sequence

I am trying to read a fasta file, manipulate is in Python (using BioPython) and then write it back. The format of my sequences is like: ...
3
votes
1answer
204 views

How to retrieve InChI key for KEGG compound?

I would like to retrieve the InChI representation for a given KEGG compound but I fail to find a direct solution for this (preferably doing it via bioservices). One could do it via ChEBI like this: ...
3
votes
1answer
1k 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 ...
4
votes
1answer
62 views

Cannot install chromosomer

I am trying to install chromosomer but I fail. Can anybody help me, please? ...
8
votes
2answers
1k views

Subset FASTA file by species name

I have a problem: I've managed to download a massive fasta file of 1500 sequences, but now I want to split them into seperate fasta files based on the genus. EDIT The fasta file looks like this: <...
4
votes
2answers
3k views

RNAseq: Z score, Intensity, and Resources

I'm very new to bioinformatics in general, and I'm trying to understand some basic concepts. I have RNAseq data, and bioinformatics people tell me that intensities cannot be compared across patients. ...
8
votes
1answer
499 views

How GFF3 attributes (9th column) varies from one gene prediction algorithm to another

GFF3 files are in tabular format with 9 fields per line, separated by tabs. The first 8 fields share almost same data structure, but the 9th field varies a lot depending on feature type and gene ...
7
votes
1answer
298 views

Reject reads with low quality bases from a Bam file through pysam

I have a code below: ...
7
votes
1answer
409 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 ...
8
votes
1answer
345 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: ...
4
votes
0answers
460 views

changing blast parameters using NCBIWWW module

I have found a blog post with a script that I would like to use for my current research project: link The script is incredibly fast and produces a smooth conservation plot. In the blog post, the ...
12
votes
3answers
755 views

How can I do an overlapping sequence count in Biopython?

Biopython's .count() methods, like Python's str.count(), perform a non-overlapping count, how can I do an overlapping one? For ...
4
votes
1answer
53 views

Software to produce a table of post-translational modifications from a peptide list

Does anyone know if there is a program/library/script in R or Python that takes as input a list of proteins/peptides and a list of post-translational modifications (PTMs; like oxidation of methionine ...
4
votes
5answers
2k views

using python to write bioinformatics pipelines tutorial

I was wondering if there is a tutorial or a small code snippet to understand how to write bioinformatics pipeline using python, for example use a aligner (say hisat) get the output and process it ...
6
votes
2answers
266 views

Is there any way of using biopython to write Swissprot files?

I have the following mwe for filtering a Swissprot file based on a certain feature, in this case, transmembrane regions. ...
9
votes
2answers
1k 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 ...
12
votes
3answers
2k views

How do you write a .gz fastq file with Biopython?

How do you write a .gz (or .bgz) fastq file using ...
4
votes
3answers
520 views

Range overlap python error with genomic regions

I have two files s3.txt : 1 10 20 1 5 20 2 20 30 2 25 30 1 10 50 2 20 60 1 14 17 s4.txt: 1 10 20 2 20 30 I am trying to match col0 ...