Giter Site home page Giter Site logo

gitdemont / ifc Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 2.77 MB

Tools for Imaging Flow Cytometry

License: GNU General Public License v3.0

R 78.26% C++ 21.74%
ifc flow cytometry image cytometry-data flow-cytometry imaging-flow-cytometry flow-cytometry-data imaging-flow-cytometry-data microscopy

ifc's People

Contributors

eddelbuettel avatar gitdemont avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

ifc's Issues

Errors during ExtractFromXIF

Hi,

Thanks a lot for developing this package. I'm facing two problems with the ExtractFromXIF function.

My data was generated with AMNIS ImageStream MkII. I am using the IFC package on the MacBook M2 Pro machine.

Whenever I try to extract features from the .rif file using ExtractFromXIF, I get an error. Here is the code and output.

blina_small_rif = ExtractFromXIF( fileName = "../Raw/Samples/20231213_blina_test_blina_6.rif", extract_features = T, extract_images = T, extract_offsets = T, extract_stats = T, verbose = T, verbosity = 2, display_progress = T, fast = T )

Extracting TAGs from /Users/bavanes/LabJournal/Experiments/2023-12-13-BA-Image_Stream_blina_test_1/Raw/Samples/20231213_blina_test_blina_6.rif, filesize:15320200390 @offset:1774340 Entries: 34 Tag:256 Typ:4 Count:1 Value:1 Bytes:4 Off:0 Tag:257 Typ:4 Count:1 Value:1 Bytes:4 Off:0 Tag:258 Typ:3 Count:1 Value:8 Bytes:2 Off:0 Tag:259 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:262 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:266 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:273 Typ:4 Count:1 Value:4294967304 Bytes:4 Off:0 Tag:277 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:278 Typ:4 Count:1 Value:1 Bytes:4 Off:0 Tag:279 Typ:4 Count:1 Value:1 Bytes:4 Off:0 Tag:282 Typ:5 Count:1 Value:4294967305 Bytes:8 Off:1 Tag:283 Typ:5 Count:1 Value:4294967313 Bytes:8 Off:1 Tag:284 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:296 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:33002 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:33004 Typ:2 Count:22 Value:4294967321 Bytes:22 Off:1 Tag:33005 Typ:2 Count:5 Value:4294967343 Bytes:5 Off:1 Tag:33006 Typ:2 Count:12 Value:4294967348 Bytes:12 Off:1 Tag:33012 Typ:12 Count:1 Value:4294967360 Bytes:8 Off:1 Tag:33018 Typ:4 Count:1 Value:705341 Bytes:4 Off:0 Tag:33027 Typ:2 Count:53741 Value:4294967368 Bytes:53741 Off:1 Tag:33064 Typ:2 Count:1720474 Value:4295021109 Bytes:1720474 Off:1 Tag:33065 Typ:2 Count:0 Value:0 Bytes:0 Off:0 Tag:33066 Typ:2 Count:11 Value:4296741583 Bytes:11 Off:1 Tag:33067 Typ:2 Count:0 Value:0 Bytes:0 Off:0 Tag:33068 Typ:12 Count:1 Value:4296741594 Bytes:8 Off:1 Tag:33069 Typ:2 Count:11 Value:4296741602 Bytes:11 Off:1 Tag:33073 Typ:12 Count:1 Value:4296741613 Bytes:8 Off:1 Tag:33078 Typ:2 Count:0 Value:0 Bytes:0 Off:0 Tag:33079 Typ:2 Count:7 Value:4296741621 Bytes:7 Off:1 Tag:33080 Typ:4 Count:1 Value:1950023108 Bytes:4 Off:0 Tag:33082 Typ:4 Count:1 Value:1 Bytes:4 Off:0 Tag:33085 Typ:12 Count:1 Value:4296741628 Bytes:8 Off:1 Tag:33086 Typ:4 Count:1 Value:0 Bytes:4 Off:0 Error in read_xml.raw(getFullTag(IFD = IFD, which = 1, tag = "33027", : Start tag expected, '<' not found [4]

For the .cif file I get a warning and no feature values are extracted:

blina_big_cif = ExtractFromXIF( fileName = "../Data/IDEAS_processing/Samples/20231213_blina_test_blina_6.cif", extract_features = T, extract_images = T, extract_offsets = T, extract_stats = T, verbose = T, verbosity = 2, display_progress = T, fast = F )

Extracting TAGs from /Users/bavanes/LabJournal/Experiments/2023-12-13-BA-Image_Stream_blina_test_1/Data/IDEAS_processing/Samples/20231213_blina_test_blina_6.cif, filesize:11496323255 @offset:8 Entries: 43 Tag:256 Typ:4 Count:1 Value:1 Bytes:4 Off:0 Tag:257 Typ:4 Count:1 Value:1 Bytes:4 Off:0 Tag:258 Typ:3 Count:1 Value:8 Bytes:2 Off:0 Tag:259 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:262 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:266 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:273 Typ:4 Count:1 Value:8 Bytes:4 Off:0 Tag:277 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:278 Typ:4 Count:1 Value:1 Bytes:4 Off:0 Tag:279 Typ:4 Count:1 Value:1 Bytes:4 Off:0 Tag:282 Typ:5 Count:1 Value:530 Bytes:8 Off:1 Tag:283 Typ:5 Count:1 Value:538 Bytes:8 Off:1 Tag:284 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:296 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:33000 Typ:4 Count:0 Value:11 Bytes:0 Off:0 Tag:33002 Typ:3 Count:1 Value:1 Bytes:2 Off:0 Tag:33004 Typ:2 Count:22 Value:546 Bytes:22 Off:1 Tag:33005 Typ:2 Count:5 Value:568 Bytes:5 Off:1 Tag:33006 Typ:2 Count:12 Value:573 Bytes:12 Off:1 Tag:33009 Typ:4 Count:0 Value:120 Bytes:0 Off:0 Tag:33012 Typ:12 Count:1 Value:585 Bytes:8 Off:1 Tag:33018 Typ:4 Count:1 Value:705341 Bytes:4 Off:0 Tag:33020 Typ:12 Count:144 Value:593 Bytes:1152 Off:1 Tag:33023 Typ:2 Count:0 Value:0 Bytes:0 Off:0 Tag:33026 Typ:2 Count:130 Value:1745 Bytes:130 Off:1 Tag:33027 Typ:2 Count:53742 Value:1875 Bytes:53742 Off:1 Tag:33064 Typ:2 Count:1720474 Value:55617 Bytes:1720474 Off:1 Tag:33065 Typ:2 Count:0 Value:0 Bytes:0 Off:0 Tag:33066 Typ:2 Count:9 Value:1776091 Bytes:9 Off:1 Tag:33067 Typ:2 Count:0 Value:0 Bytes:0 Off:0 Tag:33068 Typ:12 Count:1 Value:1776100 Bytes:8 Off:1 Tag:33069 Typ:2 Count:11 Value:1776108 Bytes:11 Off:1 Tag:33070 Typ:4 Count:1 Value:705341 Bytes:4 Off:0 Tag:33073 Typ:12 Count:1 Value:1776119 Bytes:8 Off:1 Tag:33078 Typ:2 Count:0 Value:0 Bytes:0 Off:0 Tag:33079 Typ:2 Count:7 Value:1776127 Bytes:7 Off:1 Tag:33080 Typ:4 Count:1 Value:1950023108 Bytes:4 Off:0 Tag:33081 Typ:2 Count:0 Value:0 Bytes:0 Off:0 Tag:33082 Typ:4 Count:1 Value:1 Bytes:4 Off:0 Tag:33083 Typ:1 Count:485274616 Value:1776134 Bytes:485274616 Off:1 Tag:33084 Typ:2 Count:779 Value:487050750 Bytes:779 Off:1 Tag:33085 Typ:12 Count:1 Value:487051529 Bytes:8 Off:1 Tag:33086 Typ:4 Count:1 Value:0 Bytes:4 Off:0 /Users/bavanes/LabJournal/Experiments/2023-12-13-BA-Image_Stream_blina_test_1/Data/IDEAS_processing/Samples/20231213_blina_test_blina_6.cif Mismatch in object number. Features values were not exported

My object number is 705341 events. I also see it in the tag 33018. When I try to estimate it following the way you described it in your function, I get completely random values

toread = file(description = "../Data/IDEAS_processing/Samples/20231213_blina_test_blina_6.cif", open = "rb")
readBin(toread, what = "double",size = 4, n = 1, endian = "little")

[1] 3.883381e-39

If you need any further information, I am happy to provide it. I can also provide a file I am working with, however it is more than 12GB.

Thank you!

Best regards,
Bogdan

Support for BD's FACSDiscover S8?

Hi gitdemont,

are you planning to add support for the flow imaging files generated by the machine FACSDiscover S8? The imaging files are saved in a .cvw file, but images can be exported as .TIFF.

Thanks!

Add support for FCS3.2

It would be great to handle FCS3.2 in IFC package
FCS3.2 specifications are described in https://onlinelibrary.wiley.com/doi/10.1002/cyto.a.24225

  • have access to .fcs files saved as FCS3.2
  • have access to a .csv or so with same values from .fcs

Although IFC package can read files with different bits depth FCS3.2 may store different PnDATATYPE.
Existing code may need to be reshaped or a dedicated function may need to be created especially for FCS3.2
Reading different bit depth in different type (integer/float/double) may be a slow process (Rcpp dedicated funs may help)

Multichannel .tiff plus add an ome.xml header

Hi @gitdemont,
first of all thanks for this great work. I recently start to use IFC for extracting flow citometry images from .cif and it works great.

I recently open a topic in the image.sc forum regarding the data management of flow citometry data (https://forum.image.sc/t/data-management-workflow-for-flow-cytometry-data/91882). The package IFC helped me greatly, but I was wondering if it is also possible to:

  • Within R, extract a multichannel image and not only single channels from the .cif file (IFC package version >= 0.2.1.600)
  • Add an ome.xml header to the .tiff file in order to embed directly the metadata to the image header
  • Alternatively, recreate the multichannel image outside R (edited to keep initial task numbers)

At the moment I am using a python script to perform these two steps (https://github.com/rmassei/IFC/blob/dev_python/python/multichannel_conversion_ome.py). The xml header is based on the study of Dunker et al. (2021) (doi: 10.1111/nph.16882).

hpp_decomp compression format error

Hello,

At first, I'd like to thank the authors for creating this very useful and needed tool.
While trying to visualize cells from ImageStream, I've encountered the following error:
"hpp_decomp: can't deal with compression format: 30819"

This is the full script I am using:
`library(IFC)

setwd("/home//Desktop/FlowCytometry")
daf_file_path <- "./IS_20221010_0041_MiZab/MalFl_221007_S1_3.daf"
rif <- readIFC(daf_file_path)
DisplayGallery(fileName=rif$fileName)`

I wonder, is it a matter of some codecs I need to install? Unfortunately, googling the error didn't bring any solution. I will appreciate any help.

Best regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.