Questions tagged [filtering]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
11 votes
1 answer
2k views

Why does a very strong BLAST hit get lost when I change num_alignments, num_descriptions or max_target_seqs parameter?

Disclaimer: This is a self answered question for documentation purpose and I adapted this from the following github gist. Especially from users terrycojones and peterjc as well as sujaikumar who ...
  • 401
10 votes
6 answers
6k views

How do I find identical sequences in a FASTA file?

I want to create a database for a proteomics study. Therefore, the mapping from a given sequence to a protein ID has to be unique. I am wondering whether there is already a built-in function in ...
  • 743
9 votes
5 answers
3k views

How can longest isoforms (per gene) be extracted from a FASTA file?

Is there a convenient way to extract the longest isoforms from a transcriptome fasta file? I had found some scripts on biostars but none are functional and I'm having difficulty getting them to work. ...
7 votes
2 answers
3k views

Filtering step for read counts data

I have around 1200 samples as columns and 60,000 genes with Htseq-Counts data. Before normalization with voom function I want to do filtering step. I want to remove genes whose expression is == 0 in ...
6 votes
5 answers
2k views

Delete all 4 lines of a fastq read from a fastq file using read ID

I have the following error when running bowtie2: Error: Read HWI-D00466:116:CC62WANXX:3:1102:7363:63646 1:N:0:GCACACG has more read characters than quality values. I now want to remove all 4 ...
6 votes
4 answers
704 views

Any fast options to query large VCF bed intervals?

I'm doing some analysis and I need to subset a large VCF file (~8GB gziped) given a bed interval and identify within a subset of rsid. Unfortunately, both my normal choices to do this analysis (<...
6 votes
2 answers
1k views

How to safely and efficiently convert subset of bam to fastq?

Question How can I extract reads from a bam file (produced by bwa-mem) to fastq given a ...
  • 5,357
5 votes
1 answer
532 views

Filter out outliers of the scRNA-seq (heterogenous cells)

I am new to data science. I have a dataset of single-cell gene expression from multiple cell types in C. Elegans. The dataset is from the paper Comprehensive single-cell transcriptional profiling of a ...
5 votes
1 answer
549 views

Single-cell RNA sequencing (scRNA-seq): filtering cells by transcript counts, how to choose cutoffs?

I am running a notebook with example for the MAGIC algorithm. In the data preprocessing step, a filtering operation is required to filter out cells with a small count of transcripts. My question is ...
  • 1,733
3 votes
1 answer
257 views

Fast processing of fastq data

I am trying to write python script for customized filtering for fastq file (size >3 GB). My proposed script is as follows: ...
3 votes
3 answers
71 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 ...
3 votes
1 answer
410 views

Output from vcftools missingness

I'm new to data filtering on vcf data and vcftools. I performed variant calling on my dataset, CHR22, homo sapiens. I'd like to remove sites that are missing in more than 5% of individuals. ...
3 votes
2 answers
262 views

How to subset a GRanges object based on a specific genomic window of interest?

Goal: To keep only rows of a GRanges object if their start coordinate is within 1 Mb of the start coordinate of a gene of interest. I am aware of some functions that come close: ...
  • 115
3 votes
1 answer
232 views

How to filter Ensembl cDNA and ncRNA FASTA files by primary assembly?

I'm currently performing differential expression analysis using alignment-free quantification using Kallisto. To do this, I need to create a Kallisto index using Ensembl's cDNA and ncRNA annotations ...
2 votes
3 answers
1k views

Filter BAM file for read pairs where one or both of the reads starts with a given sequence pattern

What's the most straightforward way to filter a BAM file for read pairs where one or both of the reads starts with a given sequence pattern? Would a tool that deals with UMIs work for this? Which one ...
  • 2,234
2 votes
1 answer
957 views

Select top 100 genes ranked by variance in read counts

I have a gene expression data (read counts) table with many samples. Showing some of them below: ...
  • 621
2 votes
1 answer
29 views

Filtering paired-end reads with sambamba: avoid discarding reads on the minus strand

I have a BAM file (DNA, shallow whole genome sequencing at ~1X) where I want to filter reads (using sambamba) to keep only those which have a template length > 20 and mapping quality > 20, ...
  • 131
2 votes
2 answers
203 views

How to remove sequences from a fasta file using a sequence ID list which contains a space within the id?

I have a fasta file that contains sequence reads and sequence id file that needed to be removed from the fasta file. I have done this earlier, but since id contains a space my piece of code is not ...
2 votes
2 answers
937 views

How can I extract the longest N isoforms per gene from a fasta file?

The question of how one can extract the longest isoform per gene from a multi-fasta file has been answered expertly in this thread: How can longest isoforms (per gene) be extracted from a FASTA file? ...
  • 23
2 votes
0 answers
138 views

Empty values in FILTER field after running Mutect2

I was expecting something like in this image: But when I ran Mutect2, the FILTER field was empty in the output VCF file. How can I enable PASS filters? ...
1 vote
3 answers
604 views

Edit all the fasta headers using awk

kindly your comment highly appreciated have more than 4k header sequences look like: ...
  • 364
1 vote
3 answers
92 views

How to filter out partially similar strings from two lists and make one list?

I have following two lists. List1 ...
1 vote
1 answer
253 views

Filtering out all seqs with mutations of list2 from list1

I have 2 lists, list1 and list2, of protein sequences of the same given gene in different strains. In ...
  • 143
1 vote
0 answers
35 views

RNAseq SNP discovery: deciding upon filters and dealing with allele expression bias

I am working with non-model plant RNA samples which we have been deep sequenced and analysed using STAR aligner under default parameters. Aim We would like to conduct SNP discovery of these samples. ...
  • 11
1 vote
0 answers
23 views

Discard Candidates if N >= 40%

I have obtained ( interspersed repeats ) libraries in the Palm plant genome. Still, unfortunately, the candidates obtained seems false positive a lot of tandem repeats found, due to denovo ...
  • 364
1 vote
0 answers
33 views

Filtering pileup from site lists

I want to write a script that filters a pileup file from a site lists file. As an input I get a reference genome, pileup and site lists files. Example of an output for this script: Pileup File : ...
1 vote
1 answer
56 views

How do I create a filtered gene list using expression medians

Forgive the simple noob question I have TPM data of ~50k genes (rows) across ~1k cell lines (columns). In R, I would like to output an "intermediate expression" gene list for each cell line, like: <...
1 vote
0 answers
38 views

ExpressionSet with a custom gene list

After an ExpressionSet is established, I want it to contain only the genes of my choice ("selected.txt") What is the best approach?? Thanks
  • 11
1 vote
0 answers
255 views

Error filtering SNPs with Plink

Im trying to filter SNPs using PLINK with this command. Also, the .map and .ped files were converted to a plink format from a vcf file (...
0 votes
1 answer
400 views

What are values of FILTER column of vcf files produced by Mutect2

I have called SNVs with Mutect2, now in filter column of a file called filtered vcf I have a lot of things like ...
  • 1,707
0 votes
3 answers
132 views

Discard sequences contain Ns

I have Fasta file contain multiple sequences, some of those sequences contain N's or n's, I'm trying to discard all the sequences and related header that contain Ns or ns in the file. I have tried ...
  • 364
0 votes
2 answers
837 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.., ...
  • 364
0 votes
1 answer
96 views

Annotating gene names or gene IDs to a dataframe containing SNPs?

I have a large data-frame (excel file) of SNPs with genotyping data. I need to filter the data to get SNP information of a specific gene alone. The list is too long to do it manually. I was wondering ...
0 votes
1 answer
193 views

Filtering raw sequencing reads

I have to filter the raw sequencing reads based on the following criteria: Remove reads containing adapters Remove reads containing N > 10% (N represents base that could not be determined) Remove ...
0 votes
1 answer
166 views

How to extract a subset of individuals from a .bgen file?

I have 10,000 controls and 3000 cases and the .bgen file has genotype of 200,000 individuals. I would like to extract only those individuals from the .bgen file that are either cases or controls using ...
0 votes
2 answers
327 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. ...
0 votes
0 answers
754 views

Filtering samples by FORMAT attributes using bcftools

The -e and -i options of the bcftools filter command appear, by default, to only allow for ...
-1 votes
2 answers
111 views

Filter rows of VCF file for Match=EXACT?

How do I remove rows in a VCF file on 1kGenome column, where Match=EXACT using bash ?
  • 11