Questions tagged [shell]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
13
votes
4answers
684 views

How do I efficiently subset a very large line-based file?

This has come up repeatedly recently: I have a very large text file (in the order of several GiB) and I need to perform line-based subsetting for around 10,000 lines. There exist solutions for ...
9
votes
5answers
1k views

Using shells other than bash

As someone who's beginning to delve into bioinformatics, I'm noticing that like biology there are industry standards here, similar to Illumina in genomics and bowtie for alignment, many people use ...
8
votes
9answers
15k views

Remove/delete sequences by ID from multifasta

I have a fasta file like this: >Id1 ATCCTT >Id2 ATTTTCCC >Id3 TTTCCCCAAAA >Id4 CCCTTTAAA I want to delete sequences that have the following IDs. <...
8
votes
1answer
487 views

Using a Bash Script to search TaxIDs against NCBI's Taxonomy yields "400 Bad Request" error?

I've been searching TaxIDs against NCBI's Taxonomy DB to get taxonomic lineages for species. I have successfully done this for 1,000's of TaxIDs that were returned to me by Blast+ blasts in a CSV. (...
5
votes
1answer
2k views

Splitting fasta file into smaller files based on header pattern

I have to split this fasta files into smaller files and write them into individual files my files ...
5
votes
1answer
143 views

Bash script error at paste command

I wrote script for pasting rsids on CADD output. Here is script. ...
2
votes
2answers
7k 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 ...
2
votes
3answers
162 views

Replace lowercase characters with -

I have an output from vcfutils.pl vcf2fq with specified minimal depth, and it means that nucleotides with not enough depth are lowercase. I would like to change them to gaps. I could do it in higher ...
2
votes
1answer
68 views

Pattern mining from a genomic sequence

I need to find the following pattern from a genomic sequence ...
2
votes
3answers
832 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 ...
2
votes
1answer
586 views

How do I filter a GFF file by gene type?

I have a file with following information: ...
2
votes
1answer
241 views

Executing PyMOL from a Shell script

I'm trying to execute pymol from a shell script (and it is not working). I'm not executing the script on PyMOL but even if I do this, it doesn't work neither. However, if instead of a script the ...
2
votes
0answers
47 views

Why do I obtain different output results with blast vs awk commands

I have an awk command that identifies 30 pb from two multifasta files. When I used two input files: E.g. 100 sequences each, I get the same result with the ...
2
votes
0answers
92 views

group samples based on shared mutations in a single multi samples vcf file

I am learning about vcf file formatting and have a multi-sample (>300) vcf file and aim to group (take) samples with shared mutations. Can someone suggest a tool/command/script solve this problem?
1
vote
4answers
1k views

How I can change the name of multiple files at once in R or terminal?

I have 200 .vcf files in a folder with long names like LP6005409-DNA_E03_vs_LP6005408-DNA_E03.snp.pass.vcf How can I change the name of each file to, for ...
1
vote
2answers
54 views

Pulling a numbered chromosome range file given a gene location from a lookup table ideally from command line or R

have a folder with roughly 1000 vcf files which have divided the human genome into chunks, the folder looks like this: ...
1
vote
1answer
302 views

Batch alignment of inconsistently named Fastq files

I have numerous gzip-compressed paired-end Fastq files with ChIP-seq data that I would like to align with bowtie2. I confirmed that bowtie2 takes .gz files, ...
1
vote
2answers
348 views

How to replace sequence identifiers in a fasta with OTU IDs from another file?

I'm pretty new to Unix and bioinformatics and having a hard time accomplishing the following. I have one FASTA file with sequences and headers, and one OTU ID mapping file (.txt) with OTU IDs and ...
1
vote
1answer
166 views

awk shell script

I have a folder named quant. Inside this folder I have 27 folders named SRR8068516_quant to SRR8068543_quant. I want to edit a file inside these folders titled quant.sf and produce an output. I ...
1
vote
1answer
128 views

processing multiple fastq files with cutadapt

I have DNA sample from 5 pools, having 25 fastq files each. I am running cutadapt to remove the primers using this command ...
1
vote
1answer
728 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 ...
1
vote
1answer
60 views

move files of a different group to separate directory

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 ...
1
vote
1answer
53 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: ...
1
vote
1answer
622 views

removing mitochondrial read and unassembled "random" from multiple bam files

This is the one i used for a single bam file to filter its mitochondrial as well as unassembled read ...
1
vote
1answer
39 views

how to repeat records in fastq n times efficiently?

How to iterate/repeat a record n times in a fastq file using bioawk? I wrote a python code using biopython, but it is very very slow. So, I am wondering if I can get some help by using bioawk. Thank ...
1
vote
1answer
1k views

for loop cutadapt for files on a single directory

I have a bigfolder where i have a lot of fastq.gz files and I want to remove the adapters from all of them. I am trying then the following loop: ...
1
vote
0answers
55 views

"Bad substitution" error while trimming adapters [closed]

I have this script to trim adaptors from my fastq sequencing files for PAIR in $(fastq | sed 's/_R.//g' | uniq) I am gitting this error: bad substitution Could ...
0
votes
2answers
101 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 ...
0
votes
2answers
461 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
2answers
57 views

Remove from Multi-FASTA by Sequence ID

I want to remove sequence VRE32514 – it doesn’t belong and thus is the reason it lacks additional metadata. However I tried implementing this code from a similar question: ...
0
votes
1answer
55 views

gnu parallel for macs peak calling

These are the list of files ...
0
votes
1answer
164 views

Peak-calling using homer

I have a total of 78 ATAC seq samples from which Im trying to do a peak call .I tried this batchParallel.pl findPeaks peaks function but i couldn't find the output ...
0
votes
1answer
71 views

Metagenome simulation from a concatenated FASTA file

I am trying to simulate metagenome sequencing. So I will start with a file with a lot of concatenated genomes. From there, I would like to randomly extract 10,000 sequences of length 200bps. I got ...
-1
votes
1answer
99 views

Regular expression struggle

These are my files ...