Questions tagged [python]

python is a programming language, widely used in bioinformatics

Filter by
Sorted by
Tagged with
-2
votes
1answer
35 views

How to generate ultrametric phylogenetic trees?

I have generated rooted species tree with 1000 bootstraps by RAxML. Further, I need to generate ultrametric tree for the same. Therefore, Please suggest me how to generate ultrametric tree from the ...
1
vote
0answers
49 views

How to get the GO information for all the human genes?

I would like to find a list of all the human genes and their proteins’ functional classification. The Gene type attribute on ensembl.org is not specific enough, ...
1
vote
0answers
53 views

Finding common and unique data set by comparing two files based on their column and to split the columns multiple strings to print in output

I have very large sizes tab-delimited .vcf files and want to match these two / or 3 files based on their position and print to a new .csv file File structures: File_1: tab-delimited file (.vcf) ...
1
vote
2answers
36 views

No output when trying to obtain protein sequence from PDB file

I am trying to obtain the sequence from PDB file, but no output is given when I run the following code : ...
2
votes
2answers
61 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 ...
0
votes
0answers
13 views

Chaos game representation to calculate 3 and 4mer result in a blank plot

I need to plot the 3-mer and 4-mer using the Chaos game representation for which I have referred the tutorial available at https://towardsdatascience.com/chaos-game-representation-of-a-genetic-...
1
vote
1answer
41 views

Writing a python module to run Infernal on a list of fasta files

I am very new to using python3 and am hoping to use it to reduce the time I need to spend running Infernal to look for a variety of RNAs in a large collection of bacterial genomes. I am hoping to ...
2
votes
2answers
102 views

Why does this naive Python paired Fastq reader work?

I wrote some throwaway code for ingesting paired-end reads from a Fastq file into memory. ...
0
votes
2answers
40 views

How to exclude the repetition of gene-gene correlation calculation in python?

I am trying to make a paired matrix of gene-gene correlation. Considering that I have a huge matrix (13000 genes and 900 samples) and for some reasons I don't want to decrease the number of my genes, ...
0
votes
1answer
56 views

How to represent pathways as mathematical graphs?

I would like to construct a mathematical graph: $G = (E,V, w(E))$ a graph with vertices, edges with weight on them based on a KEGG pathway. Is there a way to do that with existing tools? If not I ...
0
votes
1answer
28 views

Processed spliced and unspliced count matrices for existing scRNA-seq atlases

Before I do this myself... Is there any compiled batch-corrected dataset of the major scRNA-seq atlases (Mouse Cell Atlas, Mouse Organogenesis Atlas, Mouse Gastrulation Atlas, Tabula Muris, Tabula ...
1
vote
1answer
27 views

Unable to read all alignments in stockholm format : UnicodeDecodeError: 'utf-8'

I have a file in Stockholm format and I am trying to read it using the Biopython package. The code is as follows : ...
0
votes
0answers
9 views

Finding associated diseases of my collection of diseases extracted from DisGeNET

Goal: I have 101 diseases. (extract from DisGeNET) I want to get associated diseases of these 101 diseases. to validated disease graph that I created. Note: Associated could be measured by jaccard ...
2
votes
0answers
58 views

protein secondary structure matching/comparison scoring

I want to compare two secondary structures of aligned proteins. I do not know exactly how to do it well. Example: ...
0
votes
1answer
26 views

How to retrieve dataset names from python statsmodels?

The Python statsmodels library grants access to many R-datasets which can be downloaded e.g. with: ...
3
votes
1answer
60 views

pysam or piping samtools view to a python script

Is it faster to use the PySam package to run a python script on a bam for read in samfile.fetch('chr1', 100, 120): print read compared to using a pipe and ...
2
votes
0answers
21 views

Trouble optimizing Five Parameter Logistic (5PL) Standard Curve for ELISA data using Python

I am attempting to write a tool to be used by my lab to automatically generate a 5PL Standard Curve for ELISA data, using an XLSX file template. I am using pandas dataframes to hold the 96 wells as ...
0
votes
0answers
14 views

No module error when I use ATD script. How can I fix it?

I am using AutoDockTools and I need to prepare receptor and ligand to docking. I want to use AutoDockTools files that are located in Utilities24 folder. But when I try run this scripts by windows ...
1
vote
1answer
102 views

Is there any tool for fuzzy sequence matching?

Note: this question was also asked on biostars are you aware of any tool that is able to perform error-tolerant pattern-matching search on protein FASTA files? For example, I want to know, which ...
0
votes
2answers
41 views

How to convert mzXML to mzML format (mass spectrometry files)?

How to convert mzXML to mzML format (mass spectrometry files) preferably under Linux and/or Python?
0
votes
2answers
191 views

How to loop multiple function in shell script?

I need to extract sequences one after another consecutively from a large fasta files (multiple fasta files) and each extracted files to be saved in new fasta file (I mean the first sequence extracted ...
0
votes
0answers
38 views

working with cutadapt

I'm working with ion torrent data where I apply the program cutadapt. I'm analyzing ITS seq data, as well as Matk. When I'm using cutadapt, I search the information for this genes, and built new ...
2
votes
1answer
52 views

Pattern mining from a genomic sequence

I need to find the following pattern from a genomic sequence ...
2
votes
2answers
93 views

Efficiently iterate over bed and subset pyranges objects

I am using pyranges and I have two datasets that I want to compare in several genome-wide intervals based on a bed file. For every interval in the bed file, I want to get all overlapping positions ...
0
votes
1answer
35 views

Summing two columns where they share interval overlap

I have two bed files where each column has a numeric score. I want to sum these numbers where there is overlap between the two bed files. How do I do that? Also, I am only interested in the score in ...
0
votes
0answers
24 views

Extract secondary structures and sequences from dssp files

I have a very messy problem and I really need your help. I have a lot of dssp files in a folder. Every dssp file contains informations about proteins. Also, I have a separate file containing two ...
0
votes
1answer
57 views

Is there a way to measure cell line similarity using python?

I have a list of cell lines that should be compared against another list of cell lines as pairs. I am trying to find a way in order for me to compare two cells such as MCF7 and 10964c cell lines. I ...
1
vote
1answer
102 views

Filtering fasta files by ID

I have this code to filter some IDs from a fasta file: ...
0
votes
2answers
69 views

read and matching pattern with python

I have read the content of a text file into pandas and needed some help matching the pattern. Here is the pattern, where a can any number greater than zero and <...
2
votes
1answer
59 views

Confidence Interval with Wilcoxon Test in Python for log-normal Distribution

I have a couple arrays of dN/dS scores, and I would like to calculate the confidence interval for each array of data. dN/dS scores are not normally distributed but are log-normally distrbuted, so I ...
1
vote
1answer
33 views

storing SNPs in the genotype file for each chromosome in a separate file

I have already asked this question in another forum but have not got an appropriate answer, so wondering if anyone here can help me? I have a big file with over 3 million columns (SNPs genotypes) and ...
3
votes
2answers
103 views

PDB file downloading: pymol automation vs. manual

I automated a PDB download using a Pymol script (below) ...
0
votes
2answers
56 views

Python module for fetching NCBI id for a list of species

I have a list of scientific names of species. Is there a python module that can fetch NCBI taxonomy IDs?
2
votes
3answers
119 views

Modifing a GFF3 file and writting to a new file

I modified the GFF3 file with the below code: ...
1
vote
1answer
39 views

Adding an attribute to GFF3 file

I failed to add Note=Gene description to mRNA attribute with the below code: ...
3
votes
2answers
181 views

How to find common sequences among 6 multi-fasta files

I have 6 multi-fasta files, every of them contains ca 1500 sequences like that: ...
2
votes
0answers
39 views

Number of reactions per metabolic pathway

What is the quickest way to calculate the number of chemical reactions present in each pathway for a given organism and which online database (kegg, metacyc,reactome..) is more helpful/reliable for ...
1
vote
2answers
77 views

Biopython Failure to break out of loop

After qblast, I wanted to print only details from the first 3 BLAST output. Yet, the code below printed the details of every BLAST output. Why can't I break out of the loop to achieve my desired ...
3
votes
1answer
60 views

Access workdir defined on command line from within Snakefile

Snakemake provides access to a workflow object within a Snakefile. This allows one to, for example, have dynamic programmatic access to the directory containing the ...
1
vote
2answers
84 views

How to efficiently get human gene names from NCBI based on a large list of SNPs

I found a good answer related to my question here: How to get a list of genes corresponding to the list of SNPs (rs ids)? But it says about small number of SNPs. I want to get gene names based on ...
1
vote
1answer
41 views

semantic similarity measurement for cell line ontologies

I have a set of cell line pairs and I want to know to what extent the pairs are similar based on their ontologies. The problem I have is that I have found a Python library called Fastsemsim, but it ...
2
votes
1answer
100 views

Is there a way to use BioLemmatizer from Python?

Lemmatization is one of the most important tasks for text normalization in NLP. One of the good lemmatizers I found for biomedical domain is BioLemmatizer. However, it is developed in Java and is ...
6
votes
3answers
356 views

How to do `bedtools intersection` using pandas alone?

I have two pandas Dataframes, using python3.x: ...
3
votes
1answer
59 views

How to select only RNA with Hetero atoms from pdb file with python?

I'm trying to separate RNA from protein in a complex protein/RNA PDB file and I want all RNA info with the hetero atoms in between the bases BUT without H20 etc. In short I want RNA part of pdb file ...
1
vote
1answer
78 views

Pandas automatically rounds GWAS P-value

I am working with a specific GWAS. If I were to run this on the command line grep <rs_id_of_interest> GWAS.txt I would see the GWAS p-value to be on the ...
0
votes
1answer
117 views

Raw Data frame manipulation in python

Using python 3 I need to process qPCR sequencing raw data outputs by searching for the first occurrence of a user defined string and then making a new data frame using all lines after that string. I ...
0
votes
0answers
42 views

How to compare multiple genetic profiles in Python?

I have hundreds of vcf file where each vcf file contains genome profile for a tissue. A portion of the vcf file is as follows: [ I can read each vcf file into a dataframe. So it would be hundreds of ...
1
vote
3answers
199 views

Deep learning RNA sequences

Currently I'm working on a project, which combines deep learning with RNA sequences. I'll try to predict pseudotorsion angles [1] from raw rna sequence. The ideas is to train a neural network with raw ...
2
votes
3answers
346 views

How to reverse complement the DNA sequences for given inverse/reverse coordinates?

I have the series of coordinates in id.txt file, whose coordinates sequences are in genome.fasta file. The coordinates of id.txt ...
1
vote
0answers
19 views

the positions computed by ms

I am doing simulations using a program 'ms': https://snoweye.github.io/phyclust/document/msdoc.pdf If you look at page 3 of this pdf, it explains the output produced by ms. The line which starts ...