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

Using biocmanager for flowcore and biobase #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions FCS-to-CSV v2.0.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
##### USER INPUT #####

# Install packages if required
if(!require('flowCore')) {install.packages('flowCore')}
if(!require('Biobase')) {install.packages('Biobase')}
# BiocManager is used to provide compatibility for flowCore for R version 3.6 and above.
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("flowCore")
BiocManager::install("Biobase")
Comment on lines +12 to +16

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, this change might break backwards-compatibility with older versions of R.

@tomashhurst Would you accept a pull request with an if statement that checks for the R version and then either uses the current code (R < 3.6) or the code @ghar1821 suggested for higher R versions?

Chris

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That certainly would! There might be some issues with the Bioconductor end of things, but we can certainly try that out.


if(!require('data.table')) {install.packages('data.table')}

# Load packages
Expand All @@ -31,8 +35,8 @@
#PrimaryDirectory <- getwd() # Assign the working directory as 'PrimaryDirectory'
#PrimaryDirectory

## Use to list the .csv files in the working directory -- important, the only CSV files in the directory should be the one desired for analysis. If more than one are found, only the first file will be used
FileNames <- list.files(path=PrimaryDirectory, pattern = ".fcs") # see a list of CSV files
## Use to list the .fcs files in the working directory -- important, the only FCS files in the directory should be the one desired for analysis. If more than one are found, only the first file will be used
FileNames <- list.files(path=PrimaryDirectory, pattern = ".fcs") # see a list of FCS files
as.matrix(FileNames) # See file names in a list

## Read data from Files into list of data frames
Expand Down