Questions tagged [awk]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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 ...
0
votes
2answers
38 views

Extract sequences from partial Header

I have a library I would like to split them based on their headers. Some are related to RNA and DNA. The header contains much information, but the most important the presence of DNA or RNA/LTR.., ...
1
vote
3answers
40 views

awk field separtor

I have a file like this : and I want the output as: I tried using awk : awk 'BEGIN { OFS=FS="\t" } { sub("\\..*", "", $1); print }' ...
0
votes
2answers
36 views

separate genes with expression values

I have a file like this with 2 columns. I want to separate the columns based on plus and minus signs into separate files. How do I do this with awk or sed. Kindly help.
2
votes
2answers
55 views

Extracting specific sections from FASTQ determined by positions

Given a FASTQ file, I'd like to generate a new FASTQ file including only certain subsections of the original sequences specified by their positions. For example, say I want to extract the ...
1
vote
1answer
94 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
139 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 ...
-5
votes
1answer
99 views

How I reformat this data [closed]

I have this data all is one line even gene from first sample joined the second one while I want this data column wise each field separated like I have provided ...
-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
3answers
141 views

Edit all the fasta headers using awk

kindly your comment highly appreciated have more than 4k header sequences look like: ...
1
vote
1answer
34 views

how to calculate coverage of each base of mapped reads?

I have a RNA aligned file without any header info. I need to calculate the coverage of each mapped base for per chromosome. Is it possible to do it with perl ? ...
1
vote
4answers
172 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
53 views

How to merge two files on the first 3 columns?

I have two files that look like this: ...
0
votes
1answer
54 views

awk find pattern

I am trying to find this pattern on a large file but the output doesn't look good. The output doesn't seem to reflect the pattern. ...
0
votes
3answers
66 views

match two files and check if position of chrom is within exon region

I have two files, file1 and file2. I want to match file1 chrom with ...
0
votes
4answers
75 views

Merging two files together

Is it possible to merge two files together using awk? I have two files with matched Chrom and pos column file1 has the columns ...
0
votes
1answer
45 views

Filter out other character after the genotype

Is it possible to filter out all the characters that come after the genotype, for example, I have a data ...
1
vote
1answer
44 views

awk find Sickle cell anemia from father, mother, son, daughter

I have a file where i what to check for a pattern below and print out all the lines that matches the pattern but the output is empty. here is the pattern that i am looking for. Father = 1/0 or 0/1 ...
4
votes
3answers
119 views

awk working with large files

I have two very large vcf files 2GB and 6GB I want to look for unique combinations of CHROM and POS and output the row that matches. However, because the files a so large my machine always hang and ...
1
vote
4answers
148 views

split 1 column input into 5 column bed file

In f1 below I am trying to split $1 based on each line and create a bed file. If the line is a snp then the ...
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
343 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: ...
1
vote
2answers
55 views

awk for motif splicing from an amino acid alignment

I'm looking to splice out specific amino acid alignment positions as a continuous motif from an alignment (~15 000 sequences). The code is written in Perl (I agree not many developers now) but ...