Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug when regress out only 1 gene. #5970

Merged
merged 1 commit into from
May 20, 2022
Merged

fix bug when regress out only 1 gene. #5970

merged 1 commit into from
May 20, 2022

Conversation

DawnEve
Copy link
Contributor

@DawnEve DawnEve commented May 18, 2022

when regress out only one gene, like vars.to.regress = c("nFeature_RNA", "CD79A"),
there will be a wrong message containing all the cell barcode and subsequent lm error, which can be corrected by adding , drop=F

> pbmc_small3 <- ScaleData(pbmc_small, features = all.genes,
+                          vars.to.regress = c("nFeature_RNA", "CD79A"))
Warning: Requested variables to regress not in object: CD79A
Regressing out nFeature_RNA, ATGCCAGAACGACT, CATGGCCTGTGCAT, GAACCTGATGAACC, TGACTGGATTCTCA, AGTCAGACTGCACA, TCTGATACACGTGT, TGGTATCTAAACAG, GCAGCTCTGTTTCT, GATATAACACGCAT, AATGTTGACAGTCA, AGGTCATGAGTGTC, AGAGATGATCTCGC, GGGTAACTCTAGTG, CATGAGACACGGGA, TACGCCACTCCGAA, CTAAACCTGTGCAT, GTAAGCACTCATTC, TTGGTACTGAATCC, CATCATACGGAGCA, TACATCACGCTAAC, TTACCATGAATCGC, ATAGGAGAAACAGA, GCGCACGACTTTAC, ACTCGCACGAAAGT, ATTACCTGCCTTAT, CCCAACTGCAATCG, AAATTCGAATCACG, CCATCCGATTCGCC, TCCACTCTGAGCTT, CATCAGGATGCACA, CTAAACCTCTGACA, GATAGAGAAGGGTG, CTAACGGAACCGAT, AGATATACCCGTAA, TACTCTGAATCGAC, GCGCATCTTGCTCC, GTTGACGATATCGG, ACAGGTACTGGTGT, GGCATATGCTTATC, CATTACACCAACTG, TAGGGACTGAACTC, GCTCCATGAGAAGT, TACAATGATGCTAG, CTTCATGACCGAAT, CTGCCAACAGGAGC, TTGCATTGAGCTAC, AAGCAAGAGCTTAG, CGGCACGAACTCAG, GGTGGAGATTACTC, GGCCGATGTACTCT, CGTAGCCTGTATGC, TGAGCTGAATGCTG, CCTATAACGAGACG, ATAAGTTGGTACGT, AAGCGACTTTGACG, ACCAGTGAATACCG, ATTGCACTTGCTTT, CTAGGTGATGGTTG, GCACTAGACCTTTA, CATGCGCTAGTCAC, TTGAGGACTACGCA, ATACCACTCTAAGC, CATATAGACTAAGC, TTTAGCTGTACTCT, GACATTCTCCACCT, ACGTGATGCCATGA, ATTGTAGATTCCCG, GATAGAGATCACGA, AATGCGTGGACGGA, GCGTAAACACGGTT, ATTCAGCTCATTGG, GGCATATGGGGAGT, ATCATCTGACACCA, GTCATACTTCGCCT, TTACGTACGTTCAG, GAGTTGTGGTAGCT, GACGCTCTCTCTCG, AGTCTTACTTCGGA, GGAACACTTCAGAC, CTTGATTGATCTTC
  |==================================================================================| 100%
Centering and scaling data matrix
  |==================================================================================| 100%

@DawnEve DawnEve changed the title Fix preprocessing.R fix bug when regress out only 1 gene. May 18, 2022
@timoast timoast merged commit a1c70e0 into satijalab:develop May 20, 2022
@timoast
Copy link
Collaborator

timoast commented May 20, 2022

Thanks @DawnEve !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants