Details
-
Type:
Task
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Story Points:1
-
Sprint:Fall 5, Fall 6
Description
Markdown: FindMutantVsWildtypeDEGenes-DESeq2.Rmd
Code issue: v = rs$padj<=Q & rs$log2FoldChange>=lfcThreshold
The issue with this code is that it only includes the greater than or equal to log2foldchange of just 1 and we want to include -1 as well. To fix this use the abs() function. The comps values (# of genes) should be higher after this is fixed.
Bug Update: The abolsute value function, abs(), worked with the code and counts genes with a -1 and 1 log2foldchange threshold.
Edits in markdown:
Checking the method code: To check if this method was working accurately, I made a separate script that grabbed just one group and performed the same strategy and saved the results as a csv and went through the file and saw that the statement was true and that the adjusted pvalues were all less than or equal to 0.01 and the log2fold change threshold was >= 1 or <=-1.
res= read.csv('MvW-SL5.txt',sep = "\t",stringsAsFactors = F, header=T) V.34.75 <- res[res$group1 == 'V.34.75',] V.34.75 V.34.75 <-data.frame(V.34.75) final1 <- subset(V.34.75, padj<=0.01 & log2FoldChange>=1) final2 <- subset(V.34.75, padj<=0.01 & log2FoldChange<=-1) final <- rbind(final1, final2) final <- data.frame(final) nrow(final) write.csv(final, "/Users/mollydavis333/Desktop/finalresults.csv", row.names=FALSE, quote=FALSE)Note: There are more result conditions required in the markdown compared to my script so numbers my vary by small amounts but the statements are accurate and perform the required task of fixing the threshold bug in the markdown.