I am receiving the same error message when attempting to create my dds from HTSeqCounts: Error in Ops.factor(a$V1, l[[1]]$V1) :
level sets of factors are different.
However, I am absolutely sure the first column of features of my htseq-count files are identical and I have deleted any headers. My count files are identical in format to other former lab members who have run successful DESeq and they are all the same length. I am at a loss for why I would still receive this error!
Unconfigured Ad
Collapse
X
-
Good news, I tried it and started getting the right output files! Will let you know if anything else comes up when running DESeq.
Leave a comment:
-
-
Hi, I think you are having the same problem that I originally had when I started using htseq-count: namely using the wrong input to run DESeq.
htseq-count writes the count table directly into STDOUT, while the "-o" option creates an additional sam file, which in most cases you won't need.
If you want htseq-count to write a separate text file for your counts, you can use "> yourfilename.txt".
So you should change "-o" to ">" in your script.
Let me know if it worked.
Leave a comment:
-
-
The input files were generated using HT-Seq with this specific command line argument:
The txt file look weird compared to some of my colleagues previous runs. Mine is around 600mb and looks some thing like:Code:htseq-count -f bam -s reverse -i Name -o {0}_htseq_out.txt {1} /Volumes/cachannel/RNA_SEQ/Notch_RNASeq/9.1_Reference_Files/XENLA_UTAmayball_cdna_longest_CHRS2.gff3'.format(files, files)
While theirs is around 3 mb and looks like (what I know I should be getting):Code:XF:Z:__alignment_not_unique XF:Z:__alignment_not_unique XF:Z:__alignment_not_unique XF:Z:__alignment_not_unique XF:Z:__alignment_not_unique XF:Z:__alignment_not_unique XF:Z:__alignment_not_unique XF:Z:__alignment_not_unique XF:Z:__alignment_not_unique XF:Z:__no_feature XF:Z:__alignment_not_unique XF:Z:__alignment_not_unique
This leads me to believe it may be more of a problem with HT-Seq...Code:AAGAB|c.Audic201207_X025945|JGIv7b.000058049_4975593-4992662-__chr3L 27 AAGAB|c.Park201106_X000169|JGIv7a.000035880_844976-861439-__chr3L 0 AAGAB|c.Taira201203egg_X008072|NIGv2.S00000107_247362-264101-__chr3L 0 AAGAB|c.Ueno201210kidney_X002041|NIGv2.S00001669_498925-515626-__chr3L 0 AAGAB|c.UniGene_Xl_S20337254|JGIv7b.000036401_3602075-3619253+__chr3S 424
Leave a comment:
-
-
I think the error you describe may be due to mismatch between the count tables that you provided (e.g. different number of rows, non-unique rows, typos).
How did you generate your input files? How do your count txt files look?
Leave a comment:
-
-
DESeqDataSet creation error
Hi, I'm a new to learning DESeq,
I am having a similar problem that has been talked about here. This is the error:
This is the script I am using:Code:Error in Ops.factor(a$V1, l[[1]]$V1) : level sets of factors are different In addition: Warning message: In is.na(e1) | is.na(e2) : longer object length is not a multiple of shorter object length
I also tried running this code from the command line as mentioned above:Code:library("DESeq2") files = c("merged_sample_2.bam_htseq_out.txt","merged_sample_11.bam_htseq_out.txt","merged_sample_20.bam_htseq_out.txt","merged_sample_3.bam_htseq_out.txt","merged_sample_12.bam_htseq_out.txt","merged_sample_21.bam_htseq_out.txt") cond = c("GFP","GFP","GFP","DBM","DBM","DBM") sTable = data.frame(sampleName = files, fileName = files, condition = cond) dds <-DESeqDataSetFromHTSeqCount(sampleTable=sTable, directory = "/Volumes/cachannel/RNA_SEQ/Notch_RNASeq/in_silico_test/DESeq", design = ~condition)
But got this error:Code:cut -f merged_sample_2.bam_htseq_out.txt | sort | uniq -c
Any help would be appreciated. Thanks!Code:cut: [-cf] list: illegal list value
Last edited by ronaldrcutler; 05-09-2016, 07:35 PM.
Leave a comment:
-
-
Hello pm2012,Originally posted by pm2012 View PostThanks a lot for help. It was indeed a problem with my count files. I didn't realize I had to redirect the output of HTseq into a different file. I was using file generated with -o option as an input.
I reran the script & was able to generate the correct file (also filtered the last few lines starting with __). The rest of code seems to be working well now.
I also got rid of last colum in sampleTable. It was just one of the many things I was trying to solve my issue.
I am having the same problem that you had back then.
I also just used the file produced by -o option and got the same error message.
How exactly did you redirect your output file to make it compatible with DESeq2?
Thanks
Leave a comment:
-
-
Just to keep the group in the loop, there ended up being two problems. The error message posted here was due to an apparent typo in one of the count files. Fixing that solved that problem. There was an additional issue due to a header line having been added (I don't know if this was done by htseq-count or not, I should have asked). Removing that allowed for the creation of a proper DESeqDataSet object.
Leave a comment:
-
-
Sure, at least as long as those 2 files are sufficient to cause the problem. You can email me at [email protected].
Leave a comment:
-
-
Hi dpryan
I can send you 2 files output from htseq-count by mail, can be?
can provide me your email?
Leave a comment:
-
-
You might just post those files somewhere so we can reproduce and track down the cause of this problem.
Leave a comment:
-
-
Hi pm2012
Thanks for your reply.
The output files I have are on this format.
gene reads_WR1
610005C13Rik 2473
0610007N19Rik 15
0610007P14Rik 1291
0610008F07Rik 149
0610009B14Rik 0
0610009B22Rik 361
0610009D07Rik 272
0610009E02Rik 4
0610009L18Rik 8
when you say, filtered, you refers to what?
command I used to generate the count:
samtools view file.bam | htseq-count -s no -i gene_name - mus_musculus.gff > WT_results_counts.txt
Thank you for your help
Leave a comment:
-
-
Did you check your count files generated from HTSeq? I had an issue with the count file itself thats why I was getting the error. The count files need to be filtered. See my previous reply to the thread above.
Leave a comment:
-
-
Hi
this is my script:
library("DESeq2")
sampleFiles <- list.files(path="/Users/me/Desktop/RNASeq/htseq-count_Results_6Samples/htseq_Adp/")
sampleCondition=factor(c(rep("pr",3), rep("wt",3)))
sampleTable=data.frame(sampleName=sampleFiles, fileName=sampleFiles,condition=sampleCondition)
directory <- c("/Users/me/Desktop/RNASeq/htseq-count_Results_6Samples/htseq_Adp/")
des <- formula(~ condition)
ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable, directory = directory, design = des)
if I do what you suggest me I have exactly same error.
> ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable, directory = directory, design = des)
Error in Ops.factor(a$V1, l[[1]]$V1) :
level sets of factors are different
Thank you
Leave a comment:
-
Latest Articles
Collapse
-
by SEQadmin2
Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
...-
Channel: Articles
07-09-2026, 11:10 AM -
-
by SEQadmin2
Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.
There is no single reason why many patients don’t respond to treatment as expected. Cancer is...-
Channel: Articles
07-08-2026, 05:17 AM -
-
by GATTACATLove this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
-
Channel: Articles
07-01-2026, 11:43 AM -
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, Yesterday, 10:26 AM
|
0 responses
12 views
0 reactions
|
Last Post
by SEQadmin2
Yesterday, 10:26 AM
|
||
|
Started by SEQadmin2, 07-09-2026, 10:04 AM
|
0 responses
25 views
0 reactions
|
Last Post
by SEQadmin2
07-09-2026, 10:04 AM
|
||
|
Started by SEQadmin2, 07-08-2026, 10:08 AM
|
0 responses
16 views
0 reactions
|
Last Post
by SEQadmin2
07-08-2026, 10:08 AM
|
||
|
Started by SEQadmin2, 07-07-2026, 11:05 AM
|
0 responses
33 views
0 reactions
|
Last Post
by SEQadmin2
07-07-2026, 11:05 AM
|
Leave a comment: