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

more flexible decompression #41

Closed
wants to merge 3 commits into from
Closed

Conversation

bluegenes
Copy link
Collaborator

@bluegenes bluegenes commented May 21, 2024

current issue:

   error[E0277]: `dyn std::io::Read` cannot be sent between threads safely
         --> src/directsketch.rs:217:51
          |
      217 |         let mut fastx_reader = parse_fastx_reader(&mut reader).context("Failed to parse FASTA/FASTQ data")?;
          |                                ------------------ ^^^^^^^^^^^ `dyn std::io::Read` cannot be sent between threads safely
          |                                |
          |                                required by a bound introduced by this call
          |
          = help: the trait `Send` is not implemented for `dyn std::io::Read`, which is required by `&mut Box<dyn std::io::Read>: Send`
          = note: required for `Unique<dyn std::io::Read>` to implement `Send`
      note: required because it appears within the type `Box<dyn std::io::Read>`
         --> /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/alloc/src/boxed.rs:195:12
          = note: required because it appears within the type `&mut Box<dyn std::io::Read>`
      note: required by a bound in `parse_fastx_reader`
         --> /Users/ntward/.cargo/registry/src/index.crates.io-6f17d22bba15001f/needletail-0.5.1/src/parser/mod.rs:80:50
          |
      80  | pub fn parse_fastx_reader<'a, R: 'a + io::Read + Send>(
          |                                                  ^^^^ required by this bound in `parse_fastx_reader`
      
      For more information about this error, try `rustc --explain E0277`.

@bluegenes bluegenes changed the base branch from main to urlsketch May 21, 2024 06:56
@bluegenes bluegenes force-pushed the other-compression branch from 8675842 to 1a4e004 Compare May 21, 2024 06:58
bluegenes and others added 2 commits May 21, 2024 00:00
`urlsketch` for downloading from any url, rather than just the genbank assembly datasets (`gbsketch`)

Notes:
- changes failure output format slightly! the new header is: `accession,name,moltype,md5sum,download_filename,url`, which matches the `urlsketch` input format.

- fixes #20
@bluegenes
Copy link
Collaborator Author

Hmm, if can't use niffler directly to get reader, could use niffler to sniff format and the xz2 lib (with tokio feature) directly to read. Would need to explicitly enable each format in that case..

@bluegenes bluegenes deleted the branch urlsketch July 15, 2024 18:48
@bluegenes bluegenes closed this Jul 15, 2024
@bluegenes bluegenes deleted the other-compression branch July 15, 2024 18:49
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.

allow other compression formats
1 participant