Questions tagged [bash]

Use this tag to refer to the questions related to the Linux and Unix shell abbreviated as bash (Bourne Again SHell).

Filter by
Sorted by
Tagged with
0 votes
1 answer
74 views

How to debug a bash script

Please somebody debug my code In sub-folders there are 500000 vcf files from which I only need 500 vcf files listed in ...
1 vote
1 answer
14 views

Salmon Multiple File SCRIPT giving error

Hi I am using Salmon quantitation for multiple fastq paired files using following code ...
1 vote
0 answers
45 views

tabix to subset each VCF by the coordinates given

I have a vcf file like below ...
3 votes
2 answers
117 views

Printing the results of for loop into a txt file

I have a for loop which prints available vcf files in the path for a list of patient IDs (using find dx data function) into my zsh terminal: ...
-1 votes
1 answer
24 views

Concatenate multiple fasta files into individual files per unique entry

I have several splitted fasta files like this: TK273759.fastaaa TK273759.fastaab TK273759.fastaac TK273759.fastaad TK273759.fastaae I want to concatenate these ...
2 votes
1 answer
113 views

Error Registering Job Definition AWS

I am in the process of creating a bioinformatics pipeline and I am currently trying to setup the AWS infrastructure for which it will run. The script I am running to setup the AWS batch job looks like ...
2 votes
0 answers
40 views

Racon: empty overlap set!

Not sure if anyone can help me with a Racon issue as the developers are not very responsive on GitHub. I am trying to assemble a genome without a reference. I first did basecalling using dorado, then ...
1 vote
2 answers
148 views

Is there an equivalent of Entrez queries for local BLAST?

I have been having some trouble with running command line BLASTn remotely. Therefore, upon recommendations, and considering I have >100 searches planned, I am considering just downloading the nt ...
-2 votes
3 answers
83 views

Filtering columns from large file based on a column list

I have list of samples as a txt file and want to only keep these samples from this large file; column name is samples name in the large file. ...
0 votes
1 answer
149 views

How to use extractfeat?

I am working on a script on bash linux to get the CDS (coding sequence) of a gene using extractfeat by EMBOSS. It gives me the error: Warning: No sequences written to output file I am unsure if my ...
0 votes
2 answers
80 views

How to calculate average from a column when consecutive cells are similar in different columns?

I wonder how can I calculate the average of column 7 (WPS_win) when consecutive cells in column 2, column 3, and column 1 are the same. The file is in bed format (tab-separated format). The original ...
2 votes
6 answers
3k views

How to measure the total size of a fastq file in base pairs?

Or Kbps/Gbps. It feels like it should be conceptually very simple, but I can't seem to figure out the right combination of keywords to find it via my search engine. Help would be appreciated! I have ...
0 votes
0 answers
76 views

Old program make error ProtDeform

Im trying to run ProtDeform on ubuntu 20.04 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3125161/ I need scoring function :/ to my project But error occurs: ...
2 votes
1 answer
110 views

Analysis of RNA sequencing with zUMIs

I wrote the .yaml file which was according the instruction from zUMIs: ...
0 votes
1 answer
94 views

A bash script for running on a bunch of bam files

I have some bam files in this directory /data/Continuum/WES/results/ I want to run GATK mutation calling over bam files I ...
1 vote
2 answers
276 views

Permutations of 4 amino acid sequence oligopeptide

I have an assignment for a project to build a tetrapeptides library to screen against some target enzymes in silicon. I am looking for a script to construct about 160000 tetrapeptide from the 20Amino ...
1 vote
1 answer
41 views

Create bam from separate sam and header

If I have multiple SAM files without header, and a header saved in a separate file, how do I convert that to a BAM file? One solution is to create intermediate files: ...
3 votes
4 answers
936 views

How can I add a ";" at the end of each fasta header line in a file?

I have a large fasta file with RNA sequences. I need to add a ; at the end of each header line (lines beginning with >) in ...
4 votes
2 answers
196 views

How can I give different names to files in a directory with a for loop in a bash script?

I'm expecting to get 17 different paired-end fastq files (34 in total), so I want to make a bash script to just run my code through all the fastq files in a directory at once. How can I change the ...
0 votes
1 answer
49 views

How can I change all text in a .tsv file to 1, except the first three fields?

I want to convert a .tsv file table in binary format (1 and 0). In which all cells containing text would become 1 and blank cells would become ...
1 vote
3 answers
250 views

How to join multiple large .tsv (> 20 GB, bed file) files by two identifier?

This question has also been asked on Biostars I wonder how can I join multiple large .tsv files (over 20 GB each) by using two identifiers (columns) which I used to do using the ...
5 votes
2 answers
3k views

BAM to gene expression matrix (UMI counts per gene per cell),10X

I am trying to reproduce some results of a scRNASeq experiment. However I am new to the server-side aspect of such analyses and am very confused at the moment. The data provided by the authors of the ...
0 votes
1 answer
29 views

Variant Filtering Using AnthonyOzerov/variant-filtering Github Repository And Python Errors

I am using the following Github repository that I cloned. One apparent issue is that it is using an old/defunct link for the phenotype_to_genes.txt that is no longer active and after several tries I ...
1 vote
2 answers
187 views

Singularity And CNV Kit

I would like to try an use Singularity with CNV kit as the HPC I use seems to work better with Singularity: Initial Attempt: ...
3 votes
3 answers
297 views

Easier / lazy way to convert an existing bash pipeline to nextflow pipeline?

Not going to lie, my head hurts when I read the NextFlow documentation (No dig on the documentation, I think my head is losing its processing capacity lol). I had written a pipeline in Bash, ...
2 votes
1 answer
88 views

CNV Kit ` from . import commands ImportError: cannot import name 'commands' from '__main__'`

I am trying to run some code for my colleague in bash ...
2 votes
4 answers
611 views

Parallelize or qsub a bash script

I have a bash script that I would like to parellelize to run on multiple nodes. My goal is to run my python sample_script.py script on pairwise comparisons of samples to see if their variants are a ...
2 votes
1 answer
97 views

Dealing With Manta Limitations

I am trying to figure out a way to remove the limiting factors that Manta says it cannot handle. To quote from the Manta page: The following limitations exist on the input BAM or CRAM files provided ...
2 votes
1 answer
103 views

Manta "--exome: command not found"

I am using Manta (https://github.com/Illumina/manta/blob/master/docs/userGuide/README.md) but whenever I try to specify the --exome command using the following code ...
3 votes
1 answer
44 views

Passing strings for password, email authentication and download link

Hi I am downloading the data from a website which requires authentication of email_id and password before the download. They then provide the download link which is used to download dataset. This ...
0 votes
1 answer
68 views

Replace a string in a column of a text file based on matching string listed in another file using linux

I have multiple sets of files, so I grepped the list from a column in a seperate file such as file1.txt. I want to change all other files by using this file1.txt based on a matching string. for ...
3 votes
1 answer
275 views

Run nextflow pipeline multiple times depending on length of a list

This question was also asked on Stack Overflow I have a Nextflow pipeline that runs a BUSCO search on input data, returns the output and then creates a report based on the output. One of my parameters ...
2 votes
1 answer
82 views

Default placeholder for missing fields doesn't work with block in xtract tool

I am using the xtract tool of the Entrez Direct (EDirect) package of NBCI. I have a list of Accession Numbers: ...
1 vote
4 answers
190 views

How to remove empty files from a directory?

I have a directory of FASTA files, some of which are empty (placeholders that were output from a pipeline) and I would like to delete the empty files using a for loop on the command line. From what I ...
2 votes
3 answers
325 views

MiXCR: only create a single export file for all clonotypes

I am using following command from MiXCR to both align, assemble and export my input files: ...
5 votes
4 answers
488 views

How to rename a file based on a directory name?

I have a lot of FASTA files that I recently scaffolded with RagTag. The output of RagTag includes a directory for each sample and the corresponding FASTA file written as "ragtag.scaffold.fasta&...
1 vote
1 answer
57 views

Problems with BED format for ClinCNV

I have some problems with ClinCNV(https://github.com/imgag/ClinCNV): I made a BED file from a BAM, then i made a GC count with ngs-bits (link: https://github.com/imgag/ngs-bits ) The main idea of ...
3 votes
1 answer
116 views

How to remove double '/' from file path, bash script

I'm using the following script to detect strandedness of my paired end RNA-seq data. ...
2 votes
2 answers
728 views

How to wget a gff from NCBI database?

Say I want to use wget to download a gff file for the X chromosome of release 5.57 of the Drosophila melanogaster genome. The NCBI page with the gff file for just this is here. However, I do not see ...
0 votes
1 answer
327 views

How to combine multiple files into one file?

I have multiple files (n=86000) with one column each and I want to combine them all into one file with 86000 columns. I tried the following command ...
1 vote
3 answers
87 views

eQTL data extraction from database JSON file

I have a long list of JSON data, with repeats of contents similar to followings. Due to the original JSON file is too long, I will just shared the hyperlinks here. This is a result generated from a ...
5 votes
2 answers
10k views

Calculating average coverage for .bam files (sequence data)

(Full discolosure that this is my first time working with sequence data, and with the bash scripting.) I need to calculate the average coverage for any .bam file. After some searching I wrote the ...
1 vote
1 answer
174 views

Running a Python Script from a bash script on multiple input files across different directory paths

I am in the process of writing up a bash script that runs three bioinformatics tools and then executes a python script. This python script compiles some of the data from the informatics tools output ...
3 votes
2 answers
404 views

Remote blastn - what is breaking my (bash) loop?

I am trying to search the NCBI non-redundant database for sequences similar to a few other (~40) sequences that I already have. So I've tried running blastn remotely, and looping through multiple ...
4 votes
0 answers
128 views

Write a bash script to run gatk, fix errors with input, and rerun until completion

I have a bam file that I want to run through GATK's SplitNCigarReads tool. Because of the way the bam file was generated, the program will often fail, with an error message stating: ...
3 votes
2 answers
87 views

bash script for interproscan REST

hey i have the problem with bash script. It should run interproscan REST Im green in bash scripting. I found this script on the web: ...
2 votes
0 answers
53 views

Is there a way antiSMASH can be used to screen a large number of genomes just for one type of biosynthetic gene cluster?

When we use antismash command with the genome sequence file as follows: antismash GCA_002095535.1_ASM209553v1_genomic.gbff it screens the genome for all the ...
2 votes
1 answer
781 views

How do I use bash for loops to loop through a WDL Array?

Within the example below a WDL array of strings, test is defined as "a","b","c","d" the ...
2 votes
2 answers
149 views

Mapping to assemblies in subdirectories

I am performing a bash loop one liner:. for k in */Assembly/*/*.fastq; do minimap2 -ax map-ont assembly.fasta $k > mapping.sam; echo $k; done The file hierarchy ...
1 vote
1 answer
91 views

Multi-line efetch digging

I'm using efetch to dig out a middle "envelope" protein within a viral genome specifically within fasta format. The code below works but may not be robust for an entire database. Thus I want ...