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

Feat request: join multiple obs_seq instances. #7

Open
hkershaw-brown opened this issue May 17, 2024 · 2 comments
Open

Feat request: join multiple obs_seq instances. #7

hkershaw-brown opened this issue May 17, 2024 · 2 comments
Assignees

Comments

@hkershaw-brown
Copy link
Member

hkershaw-brown commented May 17, 2024

Question:

  • is it sufficient to join the data frames?
  • is a blank obs_seq instance necessary to fill up with obs sequence, or just join existing obs sequence instances?

just dataframes:

class obs_sequence:
    ...
    def join_obs_sequences(self, obs_sequences):
        """Join multiple obs_sequence instances.

        Args:
            obs_sequences (list): List of obs_sequence instances.

        Returns:
            pandas.DataFrame: Joined DataFrame of all obs_sequences.
            
        """
        return pd.concat([obs.df for obs in obs_sequences])

obs_seq1 = obs_sequence('/path/to/obs_seq1.ascii')
obs_seq2 = obs_sequence('/path/to/obs_seq2.ascii')
obs_seq3 = obs_sequence('/path/to/obs_seq3.ascii')

joined_df = obs_seq1.join_obs_sequences([obs_seq2, obs_seq3])

vs join objects:

join obs sequence objects

class obs_sequence:
    ...
    @classmethod
    def join(cls, instances):
        """Join multiple obs_sequence instances.

        Args:
            obs_sequences (list): List of obs_sequence instances.

             combined = cls(file=None)
             combine all info for i in instances

        Returns:
           combined
                     
        """
       
@hkershaw-brown
Copy link
Member Author

need to actually read num_qcs from header.

hkershaw-brown added a commit that referenced this issue Jan 8, 2025
Need to actually count the num_copies and the num_qc rather than
just the total

see #7
hkershaw-brown added a commit that referenced this issue Jan 11, 2025
issue #7

should you always write from the dataframe rather than the obs_seq
object? The obs_seq object does not stay consistant with the dataframe.
@hkershaw-brown
Copy link
Member Author

Does sorting (order) matter other than time?

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

No branches or pull requests

1 participant