<jupyter_start><jupyter_text>Removing correlational structure in RNAseq dataThis "shuffled" dataset can be used as a negative control. These data should have no predictive ability or underlying features.Shuffling was performed by permuting all sample gene expression vectors independently and by shuffling sample IDs.<jupyter_code>import os
from random import sample
import numpy as np
import pandas as pd
np.random.seed(123)
def shuffle_columns(gene):
    return np.random.permutation(gene.tolist())
rna_file = 'https://github.com/greenelab/tybalt/raw/b68264f5ecffd8a8b2adf2bfc6ae01a340a90b4e/data/pancan_scaled_rnaseq.tsv.gz'
rnaseq_df = pd.read_table(rna_file, index_col=0)
rnaseq_df.head(2)
# Shuffle sample IDs
shuffled_sample_id = sample(rnaseq_df.index.tolist(), rnaseq_df.shape[0])
rnaseq_shuffled_df = rnaseq_df.apply(shuffle_columns, axis=1)
rnaseq_shuffled_df.index = shuffled_sample_id
output_file = os.path.join('data', 'pancan_scaled_rnaseq_shuffled_ids.tsv.gz')
rnaseq_shuffled_df.to_csv(output_file, sep='\t', compression='gzip')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09023255813953489, 'fraction_numerical': 0.024186046511627906, 'mean_word_length': 7.67741935483871, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '620995', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 411, 'n_tokens_neox': 390, 'n_words': 81, 'path': 'shuffled_data.ipynb', 'repo_name': 'gwaygenomics/pancan_viz', 'size': '1075'}