semvec/pypi-packages huggingface dataset:
gigachain-google-vertexai 2.0.0
An integration package connecting Google VertexAI and GigaChain
License: MIT
Requires Python: <4.0,>=3.9

# langchain-google-vertexai

This package contains the LangChain integrations for Google Cloud generative models.

## Installation

```bash
pip install -U langchain-google-vertexai
```

## Chat Models

`ChatVertexAI` class exposes models such as `gemini-pro` and `chat-bison`.

To use, you should have Google Cloud project with APIs enabled, and configured credentials. Initialize the model as:

```python
from langchain_google_vertexai import ChatVertexAI

llm = ChatVertexAI(model_name="gemini-pro")
llm.invoke("Sing a ballad of LangChain.")
```

You can use other models, e.g. `chat-bison`:

```python
from langchain_google_vertexai import ChatVertexAI

llm = ChatVertexAI(model_name="chat-bison", temperature=0.3)
llm.invoke("Sing a ballad of LangChain.")
```

#### Multimodal inputs

Gemini vision model supports image inputs when providing a single chat message. Example:

```python
from langchain_core.messages import HumanMessage
from langchain_google_vertexai import ChatVertexAI

llm = ChatVertexAI(model_name="gemini-pro-vision")
# example
message = HumanMessage(
    content=[
        {
            "type": "text",
            "text": "What's in this image?",
        },  # You can optionally provide text parts
        {"type": "image_url", "image_url": {"url": "https://picsum.photos/seed/picsum/200/300"}},
    ]
)
llm.invoke([message])
```

The value of `image_url` can be any of the following:

- A public image URL
- An accessible gcs file (e.g., "gcs://path/to/file.png")
- A local file path
- A base64 encoded image (e.g., `data:image/png;base64,abcd124`)

## Embeddings

You can use Google Cloud's embeddings models as:

```python
from langchain_google_vertexai import VertexAIEmbeddings

embeddings = VertexAIEmbeddings()
embeddings.embed_query("hello, world!")
```

## LLMs

You can use Google Cloud's generative AI models as Langchain LLMs:

```python
from langchain_core.prompts import PromptTemplate
from langchain_google_vertexai import ChatVertexAI

template = """Question: {question}

Answer: Let's think step by step."""
prompt = PromptTemplate.from_template(template)

llm = ChatVertexAI(model_name="gemini-pro")
chain = prompt | llm

question = "Who was the president of the USA in 1994?"
print(chain.invoke({"question": question}))
```

You can use Gemini and Palm models, including code-generations ones:

```python
from langchain_google_vertexai import VertexAI

llm = VertexAI(model_name="code-bison", max_output_tokens=1000, temperature=0.3)

question = "Write a python function that checks if a string is a valid email address"

output = llm(question)
```
gigachain-google-genai 2.0.0
An integration package connecting Google's genai package and GigaChain
License: MIT
Requires Python: <4.0,>=3.9

# langchain-google-genai

This package contains the LangChain integrations for Gemini through their generative-ai SDK.

## Installation

```bash
pip install -U langchain-google-genai
```

### Image utilities
To use image utility methods, like loading images from GCS urls, install with extras group 'images':

```bash
pip install -e "langchain-google-genai[images]"
```

## Chat Models

This package contains the `ChatGoogleGenerativeAI` class, which is the recommended way to interface with the Google Gemini series of models.

To use, install the requirements, and configure your environment.

```bash
export GOOGLE_API_KEY=your-api-key
```

Then initialize

```python
from langchain_google_genai import ChatGoogleGenerativeAI

llm = ChatGoogleGenerativeAI(model="gemini-pro")
llm.invoke("Sing a ballad of LangChain.")
```

#### Multimodal inputs

Gemini vision model supports image inputs when providing a single chat message. Example:

```
from langchain_core.messages import HumanMessage
from langchain_google_genai import ChatGoogleGenerativeAI

llm = ChatGoogleGenerativeAI(model="gemini-pro-vision")
# example
message = HumanMessage(
    content=[
        {
            "type": "text",
            "text": "What's in this image?",
        },  # You can optionally provide text parts
        {"type": "image_url", "image_url": "https://picsum.photos/seed/picsum/200/300"},
    ]
)
llm.invoke([message])
```

The value of `image_url` can be any of the following:

- A public image URL
- An accessible gcs file (e.g., "gcs://path/to/file.png")
- A local file path
- A base64 encoded image (e.g., `data:image/png;base64,abcd124`)
- A PIL image



## Embeddings

This package also adds support for google's embeddings models.

```
from langchain_google_genai import GoogleGenerativeAIEmbeddings

embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
embeddings.embed_query("hello, world!")
```

## Semantic Retrieval

Enables retrieval augmented generation (RAG) in your application.

```
# Create a new store for housing your documents.
corpus_store = GoogleVectorStore.create_corpus(display_name="My Corpus")

# Create a new document under the above corpus.
document_store = GoogleVectorStore.create_document(
    corpus_id=corpus_store.corpus_id, display_name="My Document"
)

# Upload some texts to the document.
text_splitter = CharacterTextSplitter(chunk_size=500, chunk_overlap=0)
for file in DirectoryLoader(path="data/").load():
    documents = text_splitter.split_documents([file])
    document_store.add_documents(documents)

# Talk to your entire corpus with possibly many documents. 
aqa = corpus_store.as_aqa()
answer = aqa.invoke("What is the meaning of life?")

# Read the response along with the attributed passages and answerability.
print(response.answer)
print(response.attributed_passages)
print(response.answerable_probability)
```
gigachain-google-community 2.0.0
An integration package connecting miscellaneous Google's products and LangChain
License: MIT
Requires Python: <4.0,>=3.9

# langchain-google-community

This package contains the LangChain integrations for Google products that are not part of `langchain-google-vertexai` or `langchain-google-genai` packages.

## Installation

```bash
pip install -U langchain-google-community
```
iRRBS 1.1.1
RRBS tool for deleting artificial cytosins
License: MIT

# improve-RRBS tool
## Overview
3’ ends of RRBS reads overlapping with genomic MspI sites include non-methylated cytosines introduced through end-repair. These cytosines are not recognized by Trim Galore and are therefore not trimmed but considered during methylation calling. To avoid methylation bias we developed improve-RRBS, which identifies and hides end-repaired cytosines from methylation calling.

## Features
- Detecting whether the input file is single-read or paired-end
- Logging the "Number of unique MspI reads", the "Number of MspI reads" and the "Number of all reads"
- Outputting a BAM file without the biased cytosines

## Installation
improve-RRBS can be installed by pip:
`pip install iRRBS`

## Usage

`python -m iRRBS.run_irrbs -i <infile> -c <chromsizes> -g <genome> -o <outputfile>`

To run improve-RRBS the following input parameters are required in this order:
- infile (-i): path to input sorted BAM file with an associated index file
- chromsizes (-c): path to chrom.sizes file to define the chromosome lengths for a given genome
- genome (-g): path to genome file
- outfile (-o): name for the output file


## Setup and Test Instructions
This guide walks you through the process of testing the iRRBS (IMPROVE-RRBS) analysis tool using a specific genomic data file. 
Follow these steps to ensure everything is set up and running correctly.
Prerequisites

Before you begin, ensure you have the following installed:

- Python
- samtools
- bedtools
    
### Test Data Preparation

Unzip the rn6 chromosome 20 fasta file

The rn6 (Rattus norvegicus) chromosome 20 fasta file comes compressed. Use the following command to decompress it:

`gunzip rn6_chr20.fa.gz`

### Run iRRBS

With the data prepared, run the iRRBS tool using the command below. Test data can be found in the "test_data" folder. 
This command specifies the input BAM file, chromosome sizes file, genome fasta file, and the output file names.

`python -m iRRBS.run_irrbs -i test_data.bam -c rn6_chr20.chrom.sizes -g rn6_chr20.fa -o test_data_out_test.bam`

### Log File

After running the test, a log file named test_data_out_test.log will be generated. This file contains information about the summary statistics of the analysis.
    
Please ensure you check the log file for any potential issues or to verify the successful completion of the test.
Compare it with the test_data_out.log file from the test_data folder.