Questions tagged [python]

python is a programming language, widely used in bioinformatics

Filter by
Sorted by
Tagged with
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 ...
6
votes
3answers
507 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 ...
2
votes
0answers
125 views

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

I want to use SNPs produced by Ipyrad, which is a python script for RADseq, using maize genome data via RAxML to examine the monophyly of a highly-variable focal species and its phylogenetic ...
20
votes
8answers
8k 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 ...
2
votes
3answers
86 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 ...
5
votes
1answer
314 views

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

I am trying to analyse the hydrophobicity of a sequence using BioPython's "SeqUtil". ...
7
votes
2answers
627 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 ...
7
votes
2answers
1k views

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

Is there a pre-existing tool which will tidy up the numbering of a PDB file? Firstly, I would like to re-number the residues on inserts to make the icode an actual residue in the chain (by that I ...
1
vote
1answer
439 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
190 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
68 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 ...
5
votes
1answer
270 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
128 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
91 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
847 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
2k 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
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 ...
0
votes
0answers
96 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
475 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
420 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" ...
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
6answers
5k 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
232 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
446 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
40 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
462 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
203 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 ...
5
votes
3answers
2k 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
980 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
738 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
986 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
1k 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
241 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: ...
5
votes
3answers
2k 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
369 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
1k 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 ...
5
votes
2answers
546 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
234 views

How to measure euclidean distance between points with vtkDelaunay3D package?

I'm working with python vtkDelaunay3D (scipy.spatial.Delaunay) package for a special purpose. Normally the package is used for triangulation/tetrahedralisation. How do I measure euclidean distance ...
2
votes
2answers
487 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
654 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
297 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
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 ...
4
votes
1answer
80 views

Cannot install chromosomer

I am trying to install chromosomer but I fail. Can anybody help me, please? ...
8
votes
2answers
3k 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 separate fasta files based on the genus. EDIT The fasta file looks like this: ...
4
votes
2answers
7k 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
966 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
428 views

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

I have a code below: ...
7
votes
1answer
587 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
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: ...
5
votes
0answers
715 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 ...

1
3 4 5
6
7