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

Need to set 'keep_flowcell_layout' to true for wrapica collection of runinfo xml #648

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

alexiswl
Copy link
Member

@alexiswl alexiswl commented Nov 3, 2024

Tested with

num_lanes = get_num_lanes_from_run_info(
        project_id="9ec02c1f-53ba-47a5-854d-e6b53101adb7",
        data_id="fil.7d86703bc9e2424c441d08dcf9e059fc"  #/ilmn-runs/bssh_aps2-sh-prod_4515537/RunInfo.xml
    )
)

print(num_lanes)

v2_samplesheet_dict = v2_samplesheet_reader(
    StringIO(
        read_icav2_file_contents_to_string(
            project_id="9ec02c1f-53ba-47a5-854d-e6b53101adb7",
            data_id="fil.b4534c47c0d5481075d308dcfabfb3a9"  #/ilmn-runs/bssh_aps2-sh-prod_4515537/SampleSheet.csv
        )
    )
)

# And now append the lane attribute to every
v2_samplesheet_dict['bclconvert_data'] = list(flatten(
    map(
        lambda bclconvert_data_row_iter: list(
            map(
                lambda lane_iter: {
                    **bclconvert_data_row_iter,
                    **{"lane": lane_iter + 1}
                },
                range(num_lanes)
            )
        ),
        v2_samplesheet_dict['bclconvert_data']
    ),
))

print(
    json.dumps(
        v2_samplesheet_dict,
        indent=4
    )
)

Returns

4

{
    "header": {
        "file_format_version": 2,
    ....
}

@alexiswl alexiswl self-assigned this Nov 3, 2024
@alexiswl alexiswl linked an issue Nov 3, 2024 that may be closed by this pull request
Copy link
Member

@victorskl victorskl left a comment

Choose a reason for hiding this comment

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

Easy win!

@victorskl victorskl added the fix label Nov 3, 2024
@alexiswl alexiswl merged commit 4577a31 into main Nov 4, 2024
6 checks passed
@alexiswl alexiswl deleted the bugifx/get-num-lanes-from-xml branch November 4, 2024 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BCLConvert manager fails to get number of lanes from runinfo
4 participants