Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8597303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:53:01+00:00 2026-06-12T00:53:01+00:00

I have 2 ~59GB text files in .fastq format. fastq files are genomics read

  • 0

I have 2 ~59GB text files in “.fastq” format. fastq files are genomics read files from a sequencer. Every 4 lines is a new read, but the lines are of variable size.

The filesize is roughly 59GB, and there are about 211M reads– which means, give or take, approximatley 211M*4 = 844M lines. The program I’m using, Bowtie, currently has the ability to do the following options:

“–skip 105M –qupto 105M”

which essentially means “skip the first 105M reads and only process up to the next 105M reads.” In this way you can break up processing of the file. The problem is, the way that it does the skipping is incredibly slow. It just reads the first 105M reads as it normally would, but doesn’t process them. Then it starts comparisons once it gets to the read value it was given.

I am wondering if I can use something like C/C++’s fsetpos to set the position to the middle of the file [or wherever] which I realize will probably put me somewhere in the middle of a line, and then from there find the beginning of the first full read to start processing rather than waiting for it to read approximately 422M lines until it gets where it needs to go. Does anybody have experience doing fsetpos on such a large file, and know whether or not the performance is any better than it is how it’s currently doing it?

Thanks–
Nick

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:53:02+00:00Added an answer on June 12, 2026 at 12:53 am

    Yes, you can position to the middle of a file using C++.

    For huge files, the performance is usually better than reading the data.

    In general, the process for positioning within a file:

    1. A request is made to read the directory entry for the file.
    2. The directory is searched to find the track and sector for the file
      position.
    3. Note: Some filesystems may have directory extensions for large
      files, thus more data will need to be read.
    4. On the next read, the hard drive is told to go to the given track
      and sector, then read in data.

    You are saving time from all the previous data to pass through the communications port and into memory (or ignored).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have converted devise new session from erb to Haml but doens't work, this is
Have an app that can use tts to read text messages. It can also
Have copy pasted the code from Blog tutorial in cakephp 2.2 but its not
have written this little class, which generates a UUID every time an object of
have a nice day. I got problem when trying to create an image from
have been using no DOCTYPE but rather simply starting with <html> as per HTML5
Have a form here with bunch of input text fields and a file upload
Have some code: using (var ctx = new testDataContext()) { var options = new
Have one Doubt In MVC Architecture we can able to pass data from Controller
Have a network location that shows paths in the 8.3 short format. I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.