Skip to main content

Questions tagged [python]

python is a programming language, widely used in bioinformatics

Filter by
Sorted by
Tagged with
3 votes
1 answer
25 views

Fixation index calculation from the vcf files

I used the Python script FSTest (https://github.com/similab/FSTest) for the calculation of the fixation index from the extracted SNPs. I used the following command: ...
DJI's user avatar
  • 31
1 vote
2 answers
48 views

Python/R/bash script to ease the comparison of different protein complexes in PDB

I would like to create a table of comparison among similar protein complexes from the pdb. This would be based on their numbers of proteins and the presence of each protein. Is there any way like ...
BioTL's user avatar
  • 21
3 votes
2 answers
60 views

Multi-pattern search in aligned sequences

I am currently working on a bioinformatics problem where I need to lookup and count the location and count of occurences of 4000-ish 5 character long patterns in each sequence of a fasta file of 700GB....
Swathi Subramanyan's user avatar
3 votes
2 answers
70 views

Running multiple sequence using spades.py on an HPC

I am trying to run a batch script to assemble sequences using the spades.py command on HPC. I tested the script with one sequence (1 forward and 1 reverse read) and this worked. I have 100 sequences ...
Lucy Kelly's user avatar
3 votes
2 answers
42 views

Biopython / ETE3 get subtree of a newick tree

I can not find a good example how to extract a subtree from a phylogenetic tree with either library. I can load newick files etc, but not sure how to search for a ...
El Dude's user avatar
  • 195
2 votes
0 answers
25 views

Using Python for Monte Carlo simulation for predicting protein nucleation aggregation

I want to write a code for a Monte Carlo simulation to determine the maximum stable complexes in a protein nucleation reaction. Also, need to graph the results for the same. Here is the problem ...
Neeraj Roy's user avatar
3 votes
0 answers
17 views

Does PGS Catalog limit the number of queries to their FTP server?

I am calculating a polygenic risk score (PGS) from the PGS Catalog using the following command: ...
Cristian Riccio's user avatar
1 vote
0 answers
25 views

Trying to plot the results of GSEA in python

I'm having some major chaos with the output table generated and then passing that to my plot function. New to this (1st time), could somebody review this piece of code and suggest some corrections. I ...
aleksk31's user avatar
1 vote
1 answer
60 views

How can I check if a PDB file is incomplete?

One of the requirements of simulating the protein chain is to check for missing atoms or residues. I.e., using software tools to identify (and, if necessary, model) any missing regions. How can I ...
user366312's user avatar
-1 votes
1 answer
40 views

How to design a synthetic wastewater FASTQ file that could be flagged as "engineered"?

I am an apprentice-level python user who occasionally works in medical laboratories and mainly does business work. I am presented with the unenviable task of orchestrating a proficiency test of some ...
grep grok's user avatar
1 vote
0 answers
28 views

How to shade text in a table

I have currently made a tool that takes input sequences and maps them to a reference sequence highlighting it. You can then save the word document and it creates a table of the sequence name and the ...
LORL's user avatar
  • 43
1 vote
0 answers
22 views

Biopython PhyloTree to PyVis Network

We are trying to convert a Phylogenetic tree to networkx previously calculated with ...
El Dude's user avatar
  • 195
2 votes
1 answer
32 views

Single Node Deletion in Cheng and Church Algorithm

Cheng and Church Algorithm is a biclustering algorithm or an unsupervised learning task with which both rows and columns in a data matrix can be placed in concurrent clusters. In the original paper, ...
ShokofehVS's user avatar
3 votes
0 answers
22 views

Q8 Accuracy Evaluation metric mathematical expression used in Protein Secondary Structure Prediction

I am working on Protein Secondary Structure Prediction using Recurrent Neural Network (GRU) model. I came across few open source projects which already worked on the similar problem. All of them are ...
Muhammad Usman's user avatar
1 vote
0 answers
19 views

Calculating the segregating sites via tskit versus counting

Can you help me understand why I am getting different values when I calculate the segregating sites from tskit api versus manually counting? Thanks! Example data generation: ...
Isin Altinkaya's user avatar
0 votes
1 answer
49 views

Fetching Protein Sequences through UniPROT gives ConnectionError

I have 193000 protein interactions in CSV named all_proteininteractions.csv which have query protein name in the 2nd column and partner protein in the 3rd like this:...
Anas Jamshed's user avatar
0 votes
1 answer
71 views

conducting a ttest on a board of 1000 genes in 50 peope divided into to groups(A and B). pvalues are different each time

I am struggling in conducting at test on a board of 1000 genes in 50 individuals divided into to groups (A and B). I have a dataset of 1000 genes of two groups of people (total individuals=50) group A ...
biostefania's user avatar
1 vote
0 answers
45 views

What versions of pip and python are appropriate for nsdpy?

I am currently trying to download all the requirements to make a COInr database, following this workflow; https://mkcoinr.readthedocs.io/en/latest/content/overview.html. It requires a couple different ...
user avatar
1 vote
4 answers
538 views

Remove sequences from a fasta file with IDs from a text file using Python

a python beginner here. I have a fasta file with 2500+ sequences, and after doing some analysis I want to remove around 200+ sequences based on the matching IDs. Now, I have one fasta file (as sample....
Irfan's user avatar
  • 81
2 votes
1 answer
104 views

How to perform liftover from 38 to 37 in R?

I have some gwas summary statistics in GRCh38 that I want to lift to GRCh37. I am trying to liftover in R using this code: ...
DN1's user avatar
  • 45
1 vote
0 answers
76 views

Need help with binding DB API

...
Neeleshwar Pandey's user avatar
0 votes
0 answers
21 views

PyRanges: drop specific record from an object

Given a specific PyRanges object, such as ...
Einar's user avatar
  • 131
1 vote
0 answers
25 views

What are some good miRNA databases?

I am writing a project proposal for my boss and it is on codon usage bias in the dystrophin protein and the spectrin-like repeats found in a hmmscan file using the longest dystrophin isoform protein ...
Rachel Sweeney's user avatar
-1 votes
1 answer
35 views

New to DNABERT confused about kmers input

I'm trying to use DNABERT to predict promoter regions. Right now, I have a df with 500k rows, 1st column is the DNA sequence (all different lengths), 2nd column says "promoter" vs. "non-...
user18482's user avatar
2 votes
1 answer
51 views

retrieving past BLAST requests in bioPython

is there any way to retrieve a BLAST request made using the Biopython library using the request's query_id? Alternatively is it possible to retrieve a query_id before the blast result is complete, and ...
kama's user avatar
  • 21
1 vote
0 answers
47 views

Adding step size to cross validation in Python package lifelines

I'm using the Python package lifelines to build a CoxPH model where I reduce the step size to 0.1, like so: ...
skubali's user avatar
  • 11
2 votes
1 answer
47 views

BioPython SeqIO fails with Invalid Alphabet found

I am trying to store a GenBank file that could be read by Geneious later. I found an example how to create the GenBank file here But now I run into Alphabet issues. ...
El Dude's user avatar
  • 195
1 vote
1 answer
96 views

bcbio run not running samples in parallel

Sorry for the cross post but I'm not getting a response on bcbio github: I'm trying to run bcbio on 20 samples and it's only running one at a time as it steps through the yaml seemingly. I'm using ...
t_creasman's user avatar
0 votes
0 answers
99 views

Error in snakemake when running conda envs in container

I am facing an issue when running snakemake with a container and conda. Let me explain better. I am developing a workflow (locally) in snakemake, where some rules use a conda env (defined in /envs/env....
DavideBrex's user avatar
3 votes
1 answer
616 views

GWAS in python?

A question similar to this has also been asked on Biostars I understand GWAS is done with R, but are any written in Python? I'm used to python and java, acclimating to R will take a bit of time and my ...
Katherine's user avatar
1 vote
0 answers
59 views

SNP How to detect regions of erratic pairwise alignment?

I have clusters of DNA sequences that contain some mutations. All the sequences in a cluster should contain the same mutations. As the mutations aren't known, those clusters of sequences were pairwise-...
Fravadona's user avatar
  • 181
1 vote
2 answers
681 views

ValueError: count not convert string to float

I'm trying to use a Python script to plot with a rolling window using pandas and seaborn. This code worked for the longest time but now it's giving me an error that I don't know how to fix. Here is ...
rimo's user avatar
  • 1,003
2 votes
2 answers
44 views

Compare files with similar names using placeholders/wildcards in Snakemake

In Snakemake I want to use two input files for comparison. The one file has a sample name (e.g. 526846), with an experimental id (e.g. EF_S13' and 'MF_S5'). The file I want to compare it to has the ...
Dandelion's user avatar
  • 353
3 votes
1 answer
146 views

Generating CIGAR strings for MSA with reference

I have a list containing the results of a MSA: ...
Fravadona's user avatar
  • 181
1 vote
1 answer
100 views

For loop in Python goes wrong

I have mutation status (0,1) for ten genes in ten cancer 3D models I have also gene expression in these 3D models, like ...
Zizogolu's user avatar
  • 2,160
0 votes
1 answer
271 views

How to pack up a Python script in the form a Dockerfile

I have a simple Python script with this header ...
Zizogolu's user avatar
  • 2,160
0 votes
1 answer
264 views

Looping over a list of cell models in Python

I have two data sets Mutations in 10 genes Gene expression in 18 cancer 3D models For every (mutation, gene) and gene expression pair we run an ANOVA test This is my data ...
Zizogolu's user avatar
  • 2,160
2 votes
1 answer
239 views

How can I develop a snakemake rule for all files in multiple directories?

I am a beginner in snakemake and I'm trying to develop a working flow. Imagine I have multiple folders and in each folder I have a tumour and normal sample files: ...
Anna1364's user avatar
  • 516
1 vote
1 answer
32 views

How to access yeast-cyc in a programmatic way to extract the GO terms?

I am a newbie in Bioinformatics, I want to extract the GO terms from yeast-cyc, which is items in the Go terms tab of this page https://yeast.biocyc.org/gene?orgid=YEAST&id=G3O-29622#tab=GO , not ...
Mountain's user avatar
  • 113
2 votes
1 answer
72 views

Snakemake and github actions

I am working on a snake-make workflow that follows the guidelines of formatting and linting so that it can be published on the official Snake-make repository. Whenever I push my code on GitHub, the ...
DavideBrex's user avatar
4 votes
1 answer
88 views

Can not launch bcftools using python's subprocess module, as it only accepts first command of commands list

I am trying to remove samples from a chromosome vcf file. I wrote a function that takes chromosome number and a list of samples to remove. When I try to run bcftools using subprocess module it only ...
YKY's user avatar
  • 171
-1 votes
1 answer
45 views

Feature-selection microbiome data to build a model to predict cancer

I want to build a machine learning model to predict colorectal cancer based on 16S rRNA microbiome data (stool samples). I have filtered the data using filtering approach by Duvallet(removing samples ...
user17818805's user avatar
3 votes
0 answers
80 views

Issue creating CNV plot from WES data

I received Whole Exome Sequencing data from an NGS company (CARIS, specifically). I received R1 and R2 FASTQ files, a BAM file aligned to hg38, and a VCF file. I used CNVPytor to create a CNV plot (...
InterestingQuestions44's user avatar
0 votes
1 answer
79 views

Invalid tag name: "1KG" and Invalid character '/' in 'SA' FORMAT field at chr1:6197766

I have a VCF file that is of the following format: ...
InterestingQuestions44's user avatar
0 votes
2 answers
40 views

Filtering cohorts in PySpark returns Py4JJavaError

I'm working with UK Biobank data. I made a cohort with the Cohort Browser and tried to extract the data with this code ...
eclarette's user avatar
1 vote
1 answer
40 views

Sql query slow on Chembl postgres database

Doing complex sql query on Chembl database and it takes 40 minutes on the machine from lab. I was thinking using dask, extract each table and export to parquet, when do the data processing . Is this a ...
Jack2501's user avatar
1 vote
2 answers
460 views

selenium webdriver is stuck after downloading and saving a pdf file from pubmed central website

I'm trying to download pdf from pubmed central using selenium webdriver in python. The code is provided below which downloads the pdf fine but, it does not quit automatically. i.e. it is sort of stuck ...
Wasim Aftab's user avatar
0 votes
0 answers
25 views

Compare in Python / PyRanges two genomic intervals to determine whether they're separate, partially overlapping, or contained

As part of a larger analysis, I need to evaluate pairs of genomic regions (regionsA and regionsB) and perform different ...
Einar's user avatar
  • 131
1 vote
2 answers
34 views

Getting rid of duplicates in a dictionary

I have a tsv file that lists the reads and read lengths from a FASTA file but some reads are duplicated - that's just from the analysis I did previously - but I want to only take one instance of the ...
rimo's user avatar
  • 1,003
0 votes
0 answers
148 views

Gene Ontology (GO) analysis and classification of bacterial whole genome annotations

I am new to Gene Ontology (GO) analysis and would like to classify and visualize the annotations. Here is the background and the steps I have taken so far: I annotated the bacterial whole genome ...
Umar's user avatar
  • 135

1
2 3 4 5
13