{"id":32611469,"url":"https://github.com/ctlab/linseed","last_synced_at":"2025-10-30T13:59:10.254Z","repository":{"id":38361069,"uuid":"125117692","full_name":"ctlab/LinSeed","owner":"ctlab","description":"Linseed: LINear Subspace identification for gene Expresion Deconvolution","archived":false,"fork":false,"pushed_at":"2025-08-22T21:00:12.000Z","size":4185,"stargazers_count":31,"open_issues_count":6,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-22T22:59:43.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctlab.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-03-13T21:35:38.000Z","updated_at":"2025-08-22T21:00:16.000Z","dependencies_parsed_at":"2025-08-23T00:02:26.145Z","dependency_job_id":null,"html_url":"https://github.com/ctlab/LinSeed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ctlab/LinSeed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctlab%2FLinSeed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctlab%2FLinSeed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctlab%2FLinSeed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctlab%2FLinSeed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctlab","download_url":"https://codeload.github.com/ctlab/LinSeed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctlab%2FLinSeed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281818072,"owners_count":26566859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-30T13:58:11.632Z","updated_at":"2025-10-30T13:59:10.233Z","avatar_url":"https://github.com/ctlab.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"Linseed tutorial\n================\nLinseed (LINear Subspace identification for gene Expresion Deconvolution) is a package that provides tools and interface to explore gene expression datasets in linear space.\n\nPaper for citing: [Paper link](https://www.nature.com/articles/s41467-019-09990-5)\n\nZaitsev, K., Bambouskova, M., Swain, A. et al. Complete deconvolution of cellular mixtures based on linearity of transcriptional signatures. Nat Commun 10, 2209 (2019). https://doi.org/10.1038/s41467-019-09990-5\n\n⚠️ Notice\n\nThe current version of this tool is stable and should work as expected. We will continue to maintain it to ensure it remains functional, addressing only critical bugs as needed. However, no new features will be added in this repository.\n\nFor enhanced functionality and continued development of deconvolution methods, please refer to our new tool, [DualSimplex](https://github.com/artyomovlab/dualsimplex), which represents the next step in this line of work.\n\n\nInstalling the package\n----------------------\n\nYou can install the package using `devtools::install_github`:\n\n``` r\ndevtools::install_github(\"ctlab/linseed\")\n```\n\nCurrent build was tested using rhub:\n\nGetting started with linseed\n----------------------------\n\nTo start working with gene expression data, we need to create a new LinseedObject, in this tutorial we will use GSE19830 (mixture of Liver, Brain and Lung), we will take only mixed samples (10-42) and will take only 10000 most expressed genes.\n\n``` r\nlibrary(linseed)\nlo \u003c- LinseedObject$new(\"GSE19830\", samples=10:42, topGenes=10000)\n```\n\nCoolinearity networks\n---------------------\n\nTo build a coolinearity network we first have to evaluate all pairwise collinearity coefficients, all pairwise spearman correlation and then run significance test which will calculate p value for each each by shuffling network weights randomly.\n\n``` r\nlo$calculatePairwiseLinearity()\nlo$calculateSpearmanCorrelation()\nlo$calculateSignificanceLevel(100)\nlo$significancePlot(0.01)\n```\n\n![](Readme_files/figure-markdown_github/networks-1.png)\n\n``` r\nlo$filterDatasetByPval(0.01)\n```\n\n    ## Total number of genes is 10000\n\n    ## The number of genes after filtering is 3297\n\n``` r\nlo$svdPlot()\n```\n\n![](Readme_files/figure-markdown_github/networks-2.png)\n\nTo visualiaze what left after filtering we can call projection plot from our object. But we have to project the data to the simplex first.\n\n``` r\nlo$setCellTypeNumber(3)\nlo$project(\"full\") # projecting full dataset\nlo$projectionPlot(color=\"filtered\")\n```\n\n![](Readme_files/figure-markdown_github/visi-1.png)\n\nDeconvolution\n-------------\n\nTo deconvolve the dataset, you first have to project (full or filtered dataset) to the simplex, and then find corners of it.\n\n``` r\nlo$project(\"filtered\")\nlo$smartSearchCorners(dataset=\"filtered\", error=\"norm\")\n```\n\n    ## Final vector is\n\n    ## 4 1 5\n\n    ## \n\n``` r\nlo$deconvolveByEndpoints()\nplotProportions(lo$proportions)\n```\n\n![](Readme_files/figure-markdown_github/deconvolution-1.png)\n\nWe can also use tSNE to haave an idea of how data looks like when dimensionally reduced.\n\n``` r\n# lets select 100 genes closest to the simplex corners \nlo$selectGenes(100)\nlo$tsnePlot()\n```\n\n![](Readme_files/figure-markdown_github/rtsne-1.png)\n\nTo compare with actual proportions you can use `dotPlotProportions` function\n\n``` r\ndata(\"proportionsLiverBrainLung\")\ndotPlotPropotions(lo$proportions, proportionsLiverBrainLung[, 10:42], guess=TRUE)\n```\n\n![](Readme_files/figure-markdown_github/proportions-1.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctlab%2Flinseed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctlab%2Flinseed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctlab%2Flinseed/lists"}