Questions tagged [grep]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
3 answers
64 views

How to copy only certain counts for genes in tsv file to new file in linux

Hi there I have generated a counts table of samples I need to compare by differential expression analysis. The layout of the counts table is as follows: Gene_id Sample_A_r1 Sample_A_r2 Sample_B_r1 ...
user avatar
0 votes
2 answers
170 views

Using grep to get lines from a file (.tsv) that contain specific samples listed in a sample file (.tsv)

So I have a file, let's call it pcawg.tsv. It's formatted like the one down below. ...
user avatar
1 vote
3 answers
86 views

Finding smaller sequences from within larger sequences

I am currently working with fastq files which have hundreds of thousands of lines of text. However, not all of them are sequences I am interested in. My sequences are in one line and have a fixed ...
user avatar
4 votes
1 answer
55 views

Telling grep to treat N as [ATCG]

Okay so I'm using grep to try and get a preview of some trimming operations that are not going as expected.. Lets say that my sequence in the FastQ file is: ATNGCNATCG What I want to do is.. ...
user avatar
  • 43
-1 votes
1 answer
189 views

How to grep with a list of genes from a gff the GO terms

I have a text file with a list of name of genes (alias names) like this (** added for emphasis): ...
user avatar
  • 11
1 vote
1 answer
41 views

How to get matching pattern along with ID in a single command in grep?

I have a file containing multiple fast sequneces. For a specific consensus pattern as input, I extracted all the matching patterns from target fasta sequences with ...
user avatar
  • 13
1 vote
2 answers
342 views

FASTQ file reads extraction paired ends

I have paired end reads and want to extract only those which have this sequence within them: TGTATGTAAACTTCCGACTTCAACTGTA I tried using ...
user avatar
1 vote
2 answers
465 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 ...
user avatar
1 vote
0 answers
78 views

How do I Read a Sam File into a String Using ifstream in C++?

I am trying to read a .sam file into a single string in C++. My end goal is to read this string into a vector, where tabs indicate separations between elements of the vector. After making a vector ...
user avatar
0 votes
2 answers
702 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.., ...
user avatar
  • 352