Questions tagged [bash]

Use this tag to refer to the questions related to the Linux and Unix shell abbreviated as bash (Bourne Again SHell). It has notable programmatic strengths over C shell (csh) and touch C shell (tcsh)

Filter by
Sorted by
Tagged with
1
vote
1answer
22 views

Mapping statistics from bam file using bbtools and sambamba

Below are the statistics for RNA-seq mapped and unmapped paired-end reads to rice genome using reformat.sh from bbtools on bam files. It gives 77% mapped and 5% unmapped, what about the remaining 18% ...
1
vote
2answers
85 views

How to run Jupyter script on Slurm HPC

Now jupyter installed on the server and I am using below code to plot the rarefaction plot but I am still getting some error. could you please suggest how I can get rid of it? ...
0
votes
1answer
35 views

repophlan script to download bacterial genome

I am trying to donwload the microbial genome using the repophlan_get_microbes.py (https://github.com/SegataLab/repophlan) but now it is running more than 10 days and still not finished on slurm HPC. ...
2
votes
5answers
70 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
0answers
24 views

Issues with AutoDock Vina

I am trying to use AutoDock Vina to do docking however I am getting this error. I would really appreciate any help as I have not been able to resolve this error despite trying numerous times.
0
votes
2answers
43 views

Using variables with fasterq-dump?

I am trying to download multiple fastq files from the SRA NCBI database which, conveniently enough, have their IDs in a range. Building a simple loop doesn't seem to do the trick, as bash appears to ...
1
vote
1answer
49 views

Split fasta file based on groups in header information and output as separate files

I have a fasta file containing the sequence of a gene across different species. In total there are around 900 samples and 12 species. (Each sequences is over multiple lines and longer than 100bp.) My ...
1
vote
1answer
26 views

How to subset genes and its nested features from a GFF file using a gene list

I would like to subset a GFF file (gene and nested features) from a gene list. The GFF file looks like this ...
4
votes
1answer
290 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 ...
0
votes
0answers
20 views

Command-line blastn not responding; trace says “Resource not available”

I hadn't used the NCBI command-line tools for a while, and just got back into it. But no matter where or how I run blastn now, I get an almost complete lack of response: just the initial "BLASTN ...
0
votes
0answers
46 views

Changing alpha-numeric IDs to numeric only IDs

I need to convert my three text files to the exact formatting of the corresponding example files in order to run my code. I think the formatting error being generated is from the geneID (bold) ...
1
vote
4answers
552 views

Edit FASTA header using sed

I need to rename the following headers from a FASTA file. Something like: ...
1
vote
1answer
143 views

remove sequences from fasta file matching a string in the header

I have a file with 16S sequences. some headers contain species information. For my purposes I would like to exclude a number of species from the file, therefore I would like to do a pattern matching ...
2
votes
0answers
60 views

Cannot blast against specific NCBI databases

I am having issues with some prokaryote reference genome databases (exact names : ref_prok_rep_genomes.*), that I downloaded from the NCBI website : https://ftp.ncbi.nlm.nih.gov/blast/db/. Files in ...
-2
votes
2answers
68 views

Calculating the number of probes for a given genomic range

I have a big data frame like this for copy number (exome seq) ...
-4
votes
1answer
47 views

Joinning columns from different files

I have 48 files in which I have r1 ...
1
vote
2answers
41 views

Trying to divide number in fourth TSV column by a certain number according to its corresponding identifier in the first column

I was wondering if anyone could help with my little issue in manipulating tsv files in order to calculate estimated coverage across many tsv files. I have tsv files that look something like this: <...
1
vote
1answer
20 views

Running tophat dockerfile in background

I need to use tophat2 to align some sequences, and I wish to use the docker container. These are large sequences so it will take a long time, plus I'm working on a university server so the chances of ...
-1
votes
1answer
38 views

Appending some columns from one tabular file to another

I have a list of files in which I have this information ...
2
votes
2answers
52 views

Moving file based on their names

I have a list of vcf files; I also have a list of names in a txt file like LP6005409-DNA_F01 LP2000325-DNA_A01 LP6005409-DNA_E02 LP6005500-DNA_C03 What I have in ...
0
votes
2answers
108 views

Looping over several files in bash

I have a bash script: I am wondering how I can change this script to loop over a bunch of .vcf files and give output .txt with the name of corresponding .vcf I tried changes done in similar script ...
0
votes
2answers
112 views

Changing this code in a way to work for my files

I have a bash script which extracts some information from a .vcf file but one .vcf file at each time. How I can change this script in a way to work on a bunch of .vcf files and the output is a .txt ...
-1
votes
1answer
45 views

bash loop for strelka2 processing for multiple files from one directory

In the below bash loop for strelka2, 3 bam files are being stored in a variable. The two questions are: Is this proper way to loop through multi bam and wait for ...
0
votes
0answers
51 views

Download raw WGS files from MG-RAST on server

I want to download multiple fastq files from the MG-RAST database. However, these must be raw sequences. I am using the following on the server: ...
0
votes
0answers
27 views

running MAFFT on windows git bash

I'm pretty new to bioinformatics, I got some shell scripts from a senior who used to do things that I need to do, but these scripts were written on a Mac and I'm trying to set it up for Windows, ...
1
vote
1answer
42 views

Fastq-dump script download X spots or all

Im trying to write a script where an optional input of -X flag can be used, or if that info is not available download all reads. my script as follow: ...
0
votes
2answers
78 views

How I can run this code on my files?

I am annotating some .txt files by Annovar software by this code nnovar]$ module load annovar/2016Feb01 [cyan01 annovar]$ table_annovar.pl But I really got ...
1
vote
2answers
114 views

How can I run a command for multiple files?

I have a bunch of .vcf files in a folder and I want to run command below on all of them but doing that one by one manually is really painful. I am seeking for a way ...
-1
votes
1answer
75 views

How I move these files based on their names in R or terminal

EDITED I have list of my samples in first column and corresponding file name for my .vcf files in second column of a file name clin_name.txt like below. For ...
0
votes
2answers
270 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 ...
2
votes
2answers
224 views

Error with BWA Mem input having multiple fastq files using cat and process substitution

Running BWA Mem on a number of paired end fastq files using process substitution on the inputs results in this error: ...
2
votes
1answer
57 views

Pattern mining from a genomic sequence

I need to find the following pattern from a genomic sequence ...
0
votes
1answer
93 views

How to edit the headers of multiple fasta files from multiple folders? (recursively)

This is an expansion of my previous question, How to edit the headers of multiple fasta files from multiple folders? My directories are organized as follows: one main directory, in which I have ...
2
votes
1answer
133 views

How to edit the headers of multiple fasta files from multiple folders?

My directories are organized as follows: one main directory, in which I have multiple directories that end with a number ranging from 314 to 727, followed by .3 . For example, 'mgm4761314.3'. Within ...
1
vote
2answers
95 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: ...
2
votes
2answers
217 views

Filter reads belonging to unique sequences with threshold

I have CLL samples as fastq files and I want to remove those reads which have a unique sequence with less than 10 read counts each. I tried this by following way using awk to make it faster: ...
0
votes
1answer
31 views

How to run 'join' command for multiple files (of 2 types) in a folder

I have two types of files for a gene in a folder File 1: FOS.tf.txt ABL2 ACTN4 ADGRE5 ADIPOR2 ADRB2 ERCC4 EZR FAS FMO4 File 2: FOS.tt.txt ...
0
votes
1answer
155 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 ...
2
votes
2answers
327 views

how to remove range from fasta header

Could you please suggest me how I can remove range from fasta header:like these number from below sequences which has some colons indicating the range of the genome :147010-147657 :149201-149845 <...
0
votes
1answer
346 views

How to extract all pair end fastq.gz files from multiple subdirectory to a single folder

I have all file names for each paired-end fastq pair as shown below. Could you please suggest how I can extract all fastq.gz files in a single folder? sample name: ...
1
vote
2answers
79 views

How to extract values from second file on the basis common first column?

File1: ENST00000000233 ARF5 ENST00000000412 M6PR ENST00000001008 FKBP4 ENST00000001146 CYP26B1 ENST00000002501 DBNDD1 ENST00000002596 HS3ST1 File 2: ...
0
votes
1answer
59 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 ...
1
vote
2answers
304 views

processing fastq files using cellranger on linux

I am trying to perform a cellranger count on fastq files generated from a 10x genomics single cell RNA Seq run. Just to provide some background, I ssh’d into the AWS using our AWS IP with MobaXTerm ...
1
vote
2answers
1k views

How to merge .fastq.qz files into a single .fastq.gz with their same id without losing any content in parallel

I have a large number of .fastq.gz files of different lane and reads. I have to merge them each reads group files into single .fastq.gz files. **eg: 1st type NA24694_GCCAAT_L001_R1_001.fastq.gz ...
1
vote
1answer
59 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 to ...
5
votes
2answers
1k views

What is a quick way to find the reverse complement in bash

I have a DNA sequence of which I would like to quickly find the reverse complement. Is there a quick way of doing this on the bash command line using only GNU tools?
3
votes
1answer
828 views

Running htseq-count over BAM files

I am trying to derive an expression matrix from BAM files using htseq-count on the server. These are bulk RNASeq BAM's by the way. I have read the ...
0
votes
1answer
30 views

How to use analysis output in my pipeline

I am running an analysis and I want to edit the output that I received from that analysis. However I cannot define the output name in my pipeline, because after running the analysis it is asking me to ...
4
votes
1answer
702 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 ...
1
vote
2answers
74 views

Using preprocessing/alignment functions on the server

I am new to bash and the processes behind cluster computing in general and need some help with understanding some basics. After looking all over the internet and this forum (+ askUbuntu) I found ...