Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save FloWuenne/aec5aa1f6fcf3bf1721b4794247098ec to your computer and use it in GitHub Desktop.
Save FloWuenne/aec5aa1f6fcf3bf1721b4794247098ec to your computer and use it in GitHub Desktop.
Save raw UMI counts and metadata for each object
## Create vector with timepoints
time_points <- c("E14.5","E16.5","E18.5","P1","P4","P7")
for(time in time_points){
rds_object <- readRDS(paste("/home/wueflo00/project/Dropseq/Andelfingerlab_Dropseq/Heart_Maturation/Analysis/Objects/",time,".expression_seurat.renamed_clusters.Rds",sep=""))
raw_umi <- as.matrix([email protected])
metadata <- [email protected]
raw_umi <- raw_umi[,rownames(metadata)]
## Write outputfiles
data_out <- "/home/wueflo00/project/Dropseq/Andelfingerlab_Dropseq/Heart_Maturation/Analysis/DGE/scHeart_data_for_ken_and_Charles/"
outfile_name_DEG <- paste(data_out,time,".raw_UMI.DGE.tsv",sep="")
outfile_name_metadata <- paste(data_out,time,".metadata.tsv",sep="")
## Write DGE
write.table(raw_umi,file=outfile_name_DEG , sep="\t",col.names=TRUE,row.names=TRUE,quote=FALSE)
## Write metadata
write.table(metadata,file=outfile_name_metadata , sep="\t",col.names=TRUE,row.names=TRUE,quote=FALSE)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment