This is a test version of Biostars. For the public version, visit https://www.biostars.org.
DEseq2 input files

Hi, I am using HIAST2, Stringtie and DEseq to do differential expression analysis. When I runned DEseq2, I got an error like that Error in DESeqDataSet(se, design = design, ignoreRank) : some values in assay are negative

So I checked my input (counting files), it shows

         X                 sample1  sample2  sample3   sample4 
[97291,] "ENSG00000235759" "     0" "     0" "      0" "     0"
[97292,] "ENSG00000235754" "     0" "     0" "      0" "     0"
[97293,] "ENSG00000235756" "     0" "     0" "      9" "     2"
[97294,] "ENSG00000235757" "     0" "     0" "      0" "     0"
[97295,] "MSTRG.19084"     "     3" "     3" "     12" "    11"
[97296,] "MSTRG.32274"     "     0" "     0" "      0" "     0"

It seems there are a space behind every numbers. I don't know why they are there and how can I get rid of them? Thanks,

rna-seq

How did you generate the table you are showing us? Add all commands.

I used prepDE.py to generate the reads counting data.

  1. HISAT2--alignment

    module load hisat2/2.1.0
    time hisat2 -p 8 -q --phred33 -x /HISAT2_index/
    -1 SRR4011898_1.fastq -2 SRR4011898_2.fastq \
    -S H9_day0_rep1.sam
    
  2. Stringtie--assemble

    stringtie ./H9_day0_rep1.bam \
    -G /Bowtie2Index/genome.gff \
    -p 4 --fr -o H9_Day0_rep1.gtf -l H9_Day0_rep1
    
  3. Stringtie---merge

    module load stringtie/1.3.3b
    stringtie --merge -p 8 -G  genes.gtf -o H9_Day0_Day4_merged.gtf mergelist.txt
    
  4. generate ballgown

    B -p 8 -G H9_Day0_Day4_merged.gtf -o ballgown/H9_Day0_rep1/H9_Day0_rep1.gtf ./H9_0_rep1/accepted_hits.bam
    
  5. prepDE.py

    module load stringtie/1.3.3b
    prepDE.py
    

I've done what I could to reformat your post so the command render in a meaningful way. I also fixed what I presume was a type in step 2 (an extra ). There's one remaining issue in step 4 (ballgown) where it looks like your full command didn't get pasted in. I don't know what your full command was, so I can't fix that.

1 answer

At least for me, read.delim() seems to be smart enough to strip the white space surrounding the numbers. But anyway a simple sed -ei "s/ //g" input_file.txt will remove the extra spaces (I assume there are tabs in the original file as well).

Log in to answer this question.