Skip to content

Commit

Permalink
Merge pull request #51 from rikenbit/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
myoshimura080822 authored Sep 9, 2021
2 parents 9626817 + 20d3cbe commit 3e8eabe
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## v1.4.1 (`-r 1.4.1`) [2021-09-09]

### `v1.4.1 Fixed`

- Fixed the problem that dimensional reduction plots are not displayed in the MulitiQC report

## v1.4 (`-r 1.4`) [2021-08-23]

### `v1.4 Added`
Expand Down
18 changes: 9 additions & 9 deletions bin/drawplot_tpm_counts.r
Original file line number Diff line number Diff line change
Expand Up @@ -113,34 +113,34 @@ if (tool_name=="fcounts"){
countdata_pca_data = create_pca_tsne_umap_mode(countdata_log, mode="pca", perplexity=10, local_connectivity=1.0, n_neighbors=15)

if (!is.null(countdata_pca_data)){
g1 = ggplot_2D(countdata_pca_data[["data_df"]], "PC1", "PC2", "pcaplot_tpm_allsample", "")
ggsave(file = "pcaplot_tpm_allsample.pdf", plot=g1, dpi=100, width=8, height=7)
g1 = ggplot_2D(countdata_pca_data[["data_df"]], "PC1", "PC2", "DRplot_pca_allsample", "")
ggsave(file = "DRplot_pca_allsample.pdf", plot=g1, dpi=100, width=8, height=7)
outputdata = countdata_pca_data[["data_df"]][,1:2]
rownames(outputdata) = colnames(countdata_log)
write.csv(outputdata, 'pcaplot_tpm_allsample.csv', quote=FALSE, append=TRUE)
write.csv(outputdata, 'DRplot_pca_allsample.csv', quote=FALSE, append=TRUE)
}

### draw tsneplot
countdata_tsne_data = create_pca_tsne_umap_mode(countdata_log, mode="tsne", perplexity=10, local_connectivity=1.0, n_neighbors=15)

if (!is.null(countdata_tsne_data)){
g2 = ggplot_2D(countdata_tsne_data[["data_df"]], "V1", "V2", "tsneplot_tpm_allsample", "")
ggsave(file = "tsneplot_tpm_allsample.pdf", plot=g2, dpi=100, width=8, height=7)
g2 = ggplot_2D(countdata_tsne_data[["data_df"]], "V1", "V2", "DRplot_tsne_allsample", "")
ggsave(file = "DRplot_tsne_allsample.pdf", plot=g2, dpi=100, width=8, height=7)

outputdata = countdata_tsne_data[["data_df"]][,1:2]
rownames(outputdata) = colnames(countdata_log)
write.csv(outputdata, 'tsneplot_tpm_allsample.csv', quote=FALSE, append=TRUE)
write.csv(outputdata, 'DRplot_tsne_allsample.csv', quote=FALSE, append=TRUE)
}

### draw umapplot
countdata_umap_data = create_pca_tsne_umap_mode(countdata_log, mode="umap", perplexity=10, local_connectivity=1.0, n_neighbors=15)

if (!is.null(countdata_umap_data)){
g3 = ggplot_2D(countdata_umap_data[["data_df"]], "V1", "V2", "umapplot_tpm_allsample", "")
ggsave(file = "umapplot_tpm_allsample.pdf", plot=g3, dpi=100, width=8, height=7)
g3 = ggplot_2D(countdata_umap_data[["data_df"]], "V1", "V2", "DRplot_umap_allsample", "")
ggsave(file = "DRplot_umap_allsample.pdf", plot=g3, dpi=100, width=8, height=7)
outputdata = countdata_umap_data[["data_df"]][,1:2]
rownames(outputdata) = colnames(countdata_log)
write.csv(outputdata, 'umapplot_tpm_allsample.csv', quote=FALSE, append=TRUE)
write.csv(outputdata, 'DRplot_umap_allsample.csv', quote=FALSE, append=TRUE)
}
}
}
Expand Down
20 changes: 11 additions & 9 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -1918,6 +1918,7 @@ process create_plots_fromTPM {

output:
file "*.{txt,pdf}" into plots_from_tpmcounts_results
file "DRplot_*.csv" into tpmcounts_DRplot
file "barplot_*.csv" into tpmcounts_barplot
file "gstat_*.csv" into tpmcounts_gstat

Expand All @@ -1930,19 +1931,19 @@ process create_plots_fromTPM {
cat $detgene_header_gstat gstat_num_of_detectedgene.csv >> tmp_file
mv tmp_file gstat_num_of_detectedgene_mqc.csv
if [[ -f pcaplot_tpm_allsample.csv ]]; then
cat $pcaplot_header pcaplot_tpm_allsample.csv >> tmp_file
mv tmp_file pcaplot_tpm_allsample_mqc.csv
if [[ -f DRplot_pca_allsample.csv ]]; then
cat $pcaplot_header DRplot_pca_allsample.csv >> tmp_file
mv tmp_file DRplot_pca_allsample_mqc.csv
fi
if [[ -f tsneplot_tpm_allsample.csv ]]; then
cat $tsneplot_header tsneplot_tpm_allsample.csv >> tmp_file
mv tmp_file tsneplot_tpm_allsample_mqc.csv
if [[ -f DRplot_tsne_allsample.csv ]]; then
cat $tsneplot_header DRplot_tsne_allsample.csv >> tmp_file
mv tmp_file DRplot_tsne_allsample_mqc.csv
fi
if [[ -f umapplot_tpm_allsample.csv ]]; then
cat $umapplot_header umapplot_tpm_allsample.csv >> tmp_file
mv tmp_file umapplot_tpm_allsample_mqc.csv
if [[ -f DRplot_umap_allsample.csv ]]; then
cat $umapplot_header DRplot_umap_allsample.csv >> tmp_file
mv tmp_file DRplot_umap_allsample_mqc.csv
fi
"""
Expand Down Expand Up @@ -2071,6 +2072,7 @@ process multiqc {
file ('plots_bar_fcounts_histone/*') from fcounts_histone_barplot.collect().ifEmpty([])
file ('plots_bar_fcounts_histone/*') from fcounts_histone_gstat.collect().ifEmpty([])
file ('plots_from_tpmcounts/*') from plots_from_tpmcounts_results.collect().ifEmpty([])
file ('plots_from_tpmcounts/*') from tpmcounts_DRplot.collect().ifEmpty([])
file ('plots_from_tpmcounts/*') from tpmcounts_barplot.collect().ifEmpty([])
file ('plots_from_tpmcounts/*') from tpmcounts_gstat.collect().ifEmpty([])
file ('plots_from_tpmcounts_rsem/*') from rsem_gene_barplot.collect().ifEmpty([])
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ manifest {
description = 'This pipeline analyses data from full-length single-cell RNA sequencing (scRNA-seq) methods.'
mainScript = 'main.nf'
nextflowVersion = '>=19.10.0'
version = '1.4'
version = '1.4.1'
}

// Function to ensure that resource requirements don't go beyond
Expand Down

0 comments on commit 3e8eabe

Please sign in to comment.