This function takes input and output files of TensorQTL and returns a list object that can be used as input for do_bms. It currenly only handles completely unpaired data, where there is no repeated measurement per donor (subject). This includes typical molecular data from clinical trials.

format_input(
  qtl,
  pheno,
  geno,
  covar,
  int,
  pheno.col = "phenotype_id",
  variant.col = "variant_id",
  feat.col = "gene_id",
  snp.col = "SNP",
  pheno.rm = 1:4,
  geno.rm = 1:6
)

Arguments

qtl

A character string specfying the name of the output file from interacton QTL mapping from TensorQTL.

pheno

A character string specifynig the name of the file containing molecular phenotes. This must be the same as the input file used for TensorQTL.

geno

A character string specifying the name of the genotype file in PLINK2 .traw format.

covar

A character string specifyng the name of the file containing covariates. This must be the same as the input file used for TensorQTL.

int

A character string specifying the name of the file containing the condition variable of interest, coded as 1, 2. This must be the same as the input file used for TensorQTL.

pheno.col

A character string specifying the name of the column of qtl containing the feature IDs.

variant.col

A character string specifying the name of the column of qtl containing the feature IDs.

feat.col

A character string specifying the name of the column of pheno containing the feature IDs.

snp.col

A character string specifying the name of the column of geno containing the SNP IDs.

pheno.rm

A vector of integers corresponding to the column numbers for non-phenotype entries in pheno.

geno.rm

A vector of integers corresponding to the column numbers for non-phenotype entries in geno.

Value

A list of lists containing:

  • y - A vector of phenotypes.

  • g - A vector of genotypes.

  • t - A vector of treatment indicators.

  • subject - A vector of subject.

  • feat.id - A character string spcifyng the feature ID.

  • snp.id - A character string specifying the SNP ID.